refactor: split aura into aura-cli and aura-ui crates - #62
Merged
Merged
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Splits the
aurabinary crate into three crates. No behavior change.crates/auraauramain.rs: parse args, thenaura_cli::dispatchoraura_ui::runcrates/aura-clisrc/cli/*. No UI deps; gpui is not in its dependency treecrates/aura-corecrates/aura-uimain.rsbody is nowpub fn run(version)Code changes beyond moves
21 of the 25 moved source files are identical apart from comments. The rest:
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'sparse(), with the version overridden.aura_ui::run(version)stores it in aOnceLock. The updater and the modal's "check updates" label read it throughcrate::app_version().mainintoaura_cli::dispatch. It still runs at the same point: after parsing, before the subcommand, before any thread starts.windows_subsystemattribute stays on the binary.Per-crate versioning and
scripts/prepare-release.share unchanged. The new crates start at 0.1.0.build-macos-app.sh, the justfile andcargo run -p aurastill work because theauracrate stays atcrates/aura.The PR also updates the
crates/aura/...paths in current docs (docs/,.agent/context,.agent/skills,.design/, CONTRIBUTING, PLAN) and inscripts/check-selectable-text.sh. It leavesdocs/plans/and.agent/memory/as they are, since those are historical records.Test plan
Local, Linux only:
cargo build --workspacecargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace: 333 passedaura --versionprintsaura 0.1.36;aura doctorandaura keys describeworkscripts/check-selectable-text.shscripts/prepare-release.sh --dry-run --no-fetchNot yet run:
cargo run -p aura) and open the modal