Skip to content

refactor: split aura into aura-cli and aura-ui crates - #62

Merged
Rfluid merged 1 commit into
mainfrom
refactor/split-cli-ui-crates
Sep 25, 2026
Merged

Rfluid merged 1 commit into
mainfrom
refactor/split-cli-ui-crates

Conversation

@Rfluid

@Rfluid Rfluid commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

Splits the aura binary crate into three crates. No behavior change.

Crate Kind Contents
crates/aura binary aura Thin main.rs: parse args, then aura_cli::dispatch or aura_ui::run
crates/aura-cli lib Former src/cli/*. No UI deps; gpui is not in its dependency tree
crates/aura-core lib Unchanged
crates/aura-ui lib Former app, tray, platform and other UI modules. Former main.rs body is now pub fn run(version)

Code changes beyond moves

21 of the 25 moved source files are identical apart from comments. The rest:

  • Version plumbing. env!("CARGO_PKG_VERSION") inside a library crate would now report that crate's version. The binary passes its own version down:
    • Cli::parse_with_version: same parse and exit-on-error behavior as clap's parse(), with the version overridden.
    • aura_ui::run(version) stores it in a OnceLock. The updater and the modal's "check updates" label read it through crate::app_version().
  • SIGPIPE reset moved from main into aura_cli::dispatch. It still runs at the same point: after parsing, before the subcommand, before any thread starts.
  • The Windows windows_subsystem attribute stays on the binary.
  • Manifests: each crate lists only the deps it uses. Nothing added or bumped.

Per-crate versioning and scripts/prepare-release.sh are unchanged. The new crates start at 0.1.0. build-macos-app.sh, the justfile and cargo run -p aura still work because the aura crate stays at crates/aura.

The PR also updates the crates/aura/... paths in current docs (docs/, .agent/context, .agent/skills, .design/, CONTRIBUTING, PLAN) and in scripts/check-selectable-text.sh. It leaves docs/plans/ and .agent/memory/ as they are, since those are historical records.

Test plan

Local, Linux only:

  • cargo build --workspace
  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace: 333 passed
  • aura --version prints aura 0.1.36; aura doctor and aura keys describe work
  • scripts/check-selectable-text.sh
  • scripts/prepare-release.sh --dry-run --no-fetch

Not yet run:

  • Launch the tray app (cargo run -p aura) and open the modal
  • macOS and Windows builds. Could not cross-compile locally; CI covers them

`crates/aura` is now a thin master binary: it parses arguments and hands
off to `aura-cli` (headless subcommands, no UI deps) or `aura-ui` (GPUI
tray app and modal). No behavior change.

The binary passes its own CARGO_PKG_VERSION down so `--version`, the
modal's update label, and the update check keep reporting the release
version instead of a library crate's version. Per-crate versioning and
scripts/prepare-release.sh are unchanged.
@Rfluid
Rfluid merged commit 35d8d2b into main Sep 25, 2026
11 checks passed
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