Skip to content

Hush is the Rust core and the GPUI app: the Swift Mac app and its build are gone - #265

Merged
pitis merged 2 commits into
mainfrom
chore/remove-swift-app
Nov 29, 2026
Merged

pitis merged 2 commits into
mainfrom
chore/remove-swift-app

Conversation

@pitis

@pitis pitis commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

The owner's decision of 2026-11-29: Hush is the Rust core plus the GPUI app (core/desktop) on macOS, Windows and Linux. This removes the Swift Mac app and its build, and makes make check the Rust gate.

Removed

  • app/: the SwiftUI app (app/Hush), its XCTest suite (app/HushTests) and app/project.yml. Its Info.plist and entitlement settings (bundle id, hardened runtime, microphone, Release stripping) stay readable in git history for The GPUI app ships on macOS as a signed Hush.app #264.
  • The Swift build: scripts/build-core.sh (xcframework + UniFFI Swift bindings), the core/uniffi-bindgen crate (only build-core.sh ran it) and its workspace entry, sig-core's crate-type = ["staticlib", "lib"] (the static library existed only for the xcframework; the app and the tests link the plain lib). Cargo.lock loses uniffi-bindgen and clap_derive, nothing else.
  • Makefile: the core, project, app and release targets (release built and installed the Swift Release app; The GPUI app ships on macOS as a signed Hush.app #264's make bundle will build the GPUI one), the XCB/XCB_FILTER variables, desktop-run (now run), the swift-format legs of format and lint, the XCTest leg and core project prerequisites of test, and setup's xcodegen and rustup target add aarch64-apple-darwin (only build-core.sh's --target build needed it).
  • .githooks/pre-commit: the swift-format step.
  • .swift-format and the Swift entries in .gitignore (app/Generated/, app/Frameworks/, app/Hush.xcodeproj/, app/Hush/Info.plist, app/Hush/Hush.entitlements, build/, which was Xcode's output; no checkout or worktree has one now).
  • CLAUDE.md: the Swift-only stack rules (generated Swift bindings/xcframework, generated Xcode project, the Mac app's platform and Liquid Glass, the Mac app's signing) and the Swift commands.

Moved

Changed

  • Makefile: make run builds and launches the GPUI app (was desktop-run); make perf builds the release app and measures it; format, lint, test and check are Rust only.
  • scripts/perf.sh measures the GPUI app (core/target/release/hush by default): the executable's size; the cold launch until the chat list loaded; idle footprint and CPU as before. It quits a running Hush first (SIGTERM for the GPUI app, which quits as Quit does; the bundle id for an installed Hush.app) and waits until it's gone; it stops the one it launched when done. The launch wait matches only the launched process's conversations: N line: log stream's header names the predicate, so the old grep -q "conversations:" matched it at once and the cold launch was never measured (the Mac app's script had the same flaw; found in review). An app that exits is reported with its stderr; when the chat list doesn't load within 10 s, Hush is left open to show why. The GPUI app now logs that line (a count only) when it loads the chat list, as the Mac app did, and the core's log filter lets the app's (hush) info lines through (it let only sig_core's through).
  • README and CLAUDE.md describe Hush as the Rust core + GPUI app. CLAUDE.md's step 4 ("UI changes: run the app") now means the GPUI app and names its snapshot renderer; "Build output lives per worktree" drops build/; the Commands list is the new targets.
  • Comments that named the removed app as current: core/rust-toolchain.toml, core/desktop/Cargo.toml (async-compat), core/desktop/src/main.rs's crate doc.

Kept, and why

  • uniffi in core/sig-core (dependency, [workspace.dependencies] entry, attributes, error.rs's "surfaced to Swift" doc): the issue leaves its removal to a later issue.
  • docs/: specs and plans stay as history.
  • The Apple-only settings the GPUI app uses on macOS: SQLCipher's CommonCrypto (the non-Apple libsqlite3-sys override stays non-Apple only), tracing-oslog and libc for Apple targets, RingRTC's prebuilt_webrtc, [profile.release] (thin LTO, stripped) and its build-override guard (rustc/Xcode linker, applies to any release build on macOS).
  • The desktop code's "the Mac app's …" comments: they cite where each rule came from (the Swift files stay in history); rewriting hundreds of them would touch every file other tickets are editing.
  • The "desktop app … own data folder ("Hush Desktop") and keychain entry" rule in CLAUDE.md: On macOS the GPUI app takes over the Mac app's data, so nothing needs relinking #263 rewrites it (the GPUI app takes over the Mac app's data).
  • DESIGN.md and PRODUCT.md: they describe the Mac app's design (macOS 26, Liquid Glass); the issue doesn't list them, so whether they're rewritten for the cross-platform app is left to the owner.
  • SHELL := /bin/bash -o pipefail in the Makefile: help still pipes.

How it was tested

  • make format: no changes. make check (now cargo fmt --check, cargo clippy --all-targets -q -- -D warnings, the same with --features hush-desktop/snapshot, cargo test --features hush-desktop/snapshot -q): passes (344 core tests, 541 app tests).
  • make desktop: builds. Snapshots: cargo run -p hush-desktop --features snapshot -- --snapshot <scratch dir> rendered all 84 PNGs (42 screens, light and dark); looked at the chat and About screens, unchanged (About still shows "core 0.1.0").
  • make help lists the new targets; make -n of setup, desktop, run, perf, format, lint, test, check, worktree, update and card prints the expected commands; make update and make card ran for real.
  • The pre-commit hook ran on this branch's commit (Rust leg only).
  • scripts/perf.sh: bash -n; its failure paths ran with stand-in executables (one that exits at once is reported with its stderr; one that never logs times out after the wait and is left running); the line match was checked against a real log stream header (ignored) and a real conversations: 0 line from the app's window tests (matched only for its own PID). Not run end to end: it needs a linked GPUI app (this Mac's isn't linked until On macOS the GPUI app takes over the Mac app's data, so nothing needs relinking #263) and opens its window. A release build that isn't signed may get a keychain prompt after each rebuild until The GPUI app ships on macOS as a signed Hush.app #264's signed bundle; the script then times out with that hint.
  • No Swift leg any more; no test added: the change is deletion and build plumbing, and the gate itself is the check.

Closes #262

The owner's decision: Hush is the Rust core plus the GPUI app on macOS,
Windows and Linux. Removes app/ (the icon moves to core/desktop), the
xcframework build (build-core.sh, uniffi-bindgen, sig-core's staticlib),
the Makefile's Swift targets and legs, the hook's swift-format step and
the Swift ignores. make run launches the GPUI app, make check is the Rust
gate, and make perf measures the GPUI app, which logs the chat list's
count as the Mac app did. README and CLAUDE.md describe the new shape.
…y a run failed

log stream's header names the predicate, so the launch wait matched it at
once and the cold launch was never measured (the Mac app's script had the
same flaw). The wait now matches only the launched process's line, waits
for a quitting Hush to stop, reports an app that exits with its stderr,
and leaves Hush open when the chat list doesn't load. Review fixes to
CLAUDE.md's snapshot command and a few comments.
@pitis

pitis commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Review (pr-review-toolkit:review-pr: code-reviewer, comment-analyzer, silent-failure-hunter) of git diff origin/main...HEAD. Fixes are in f548417; make check passes again (344 + 541 tests).

Critical / Important, fixed

  • scripts/perf.sh: the launch wait matched log stream's own header ("Filtering the log data using … BEGINSWITH "conversations:""), so the cold launch read ~0.05 s and the "didn't load" failure could never fire (on main too). It now matches only the launched process's line ([$PID:… conversations: N), which also ignores the window tests, which log the same line to the same subsystem.
  • scripts/perf.sh: nothing checked that the launched app was still alive, and its stderr was dropped (a dead PID gave a Python syntax error 30 s later). It now reports an exit at launch or while idle, with the app's stderr.
  • scripts/perf.sh: it waited a fixed 2 s after quitting a running Hush, which can take up to 6 s to stop. It now waits until no hush/Hush process is left (10 s at most, then says so).
  • CLAUDE.md step 4: the snapshot command fails from the repo root (no Cargo.toml there). It now starts with cd core && and asks for an absolute dir (a relative one would land in core/).

Suggestions, taken

  • perf.sh leaves Hush open when the chat list doesn't load, so the reason is on screen (the old hint pointed at a window the script then closed).
  • perf.sh's comment on quitting an installed Hush.app, logging.rs's note that make perf depends on hush=info, make perf's help says macOS and a linked Hush, core/desktop/Cargo.toml's tracing comment, text.rs's "so both clients word things alike".

Declined

  • Honour CARGO_TARGET_DIR in make perf's path: the repo keeps build output per worktree in core/target and never sets it.
  • Log a failed chat load as a warning: the app shows it in its banner, and a failed run now leaves the app open.
  • Reword error.rs's "Errors surfaced to Swift.": it goes with the uniffi removal the issue leaves for later.

For the owner

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.

Hush is the Rust + GPUI app only: the Swift Mac app is removed

1 participant