Skip to content

Add Herdr with worker-backed local shells - #1090

Open
demrom wants to merge 26 commits into
holzschu:masterfrom
demrom:feature/embedded-herdr
Open

demrom wants to merge 26 commits into
holzschu:masterfrom
demrom:feature/embedded-herdr

Conversation

@demrom

@demrom demrom commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Run herdr in the mini app to open local shell panes and tabs. This embeds Herdr 0.9.3's Rust client, server and Ghostty terminal engine in the app, with each pane using a shell in the extension worker pool. The adapter forwards command streams, terminal size, interrupts and close through the pool API.

Herdr/build.sh fetches pinned source and applies the iOS adapter patches, using Rust 1.96.1, Zig 0.16.0 and locked dependencies. The mini target links the resulting archive, registers herdr, forwards resize events and bundles the Apache 2.0 license. The embedded command supports the local terminal UI and informational flags; desktop background-server operations return status 78.

In an arm64 iOS Simulator app built with Xcode 27.1, the public terminal reports herdr: command not found without this change and herdr 0.9.3 with it. The same Herdr/tests/three-panes.sh public UI harness fails on the baseline's first missing receipt; with this change, three tabs produce distinct extension-worker PIDs and all three workers remain alive together. Normal detach and a second herdr --version invocation in the same app process pass. The harness confirms tab-name dialogs before submitting shell commands and paces keystrokes to avoid losing Simulator input.

This depends on the ten-worker pool, a-shell#1089 and dash_iOS#2, including its libedit patch. The prerequisites ios_system#180, #181, #182, #183, #184 and dash_iOS#1 are merged. Matching released library artifacts, worker WASM interpreter routing and the remaining host terminal fixes are pending. CPU overlap, per-pane cancellation and crash isolation, full teardown/capacity recovery, saved-session migration, physical-device behavior, background execution and App Store acceptance remain unqualified for this extracted change. Codex, optional native tools and the remote-control service are separate contributions.

Refs #1055 (mini app only).

@demrom
demrom force-pushed the feature/embedded-herdr branch from 308b557 to a3e8a22 Compare October 18, 2026 16:54
@demrom
demrom marked this pull request as ready for review October 18, 2026 16:54
demrom added 18 commits October 18, 2026 21:28
…Settings

The host runs min(worker_limit setting, hw.physicalcpu, bundled ShellWorkerCount) workers at once and returns ENOSPC beyond that. ShellWorkers/generate-targets.sh (POSIX sh and awk, like the other scripts of the repo) keeps the extension targets and the Settings list in line with ShellWorkerCount. The new Settings strings are localized in the existing Root.strings files. tests/worker-pool.m gains a limit check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant