bench5143502f8
move the TUI into crates/bench51-tui
Every front end now lives under crates/ and the root is a plain workspace. The package is bench51-tui and still builds the bench51 binary; bench51-gui is unchanged. Install the terminal app from source with cargo install --path crates/bench51-tui.
+42 −35
11 files changed
- M .github/workflows/release.yml +1 −1
- M CHANGELOG.md +3 −0
- M Cargo.lock +10 −10
- M Cargo.toml +2 −16
- M README.md +7 −7
- A crates/bench51-tui/Cargo.toml +18 −0
- R src/main.rs → crates/bench51-tui/src/main.rs +1 −1
- R src/ui/app.rs → crates/bench51-tui/src/ui/app.rs +0 −0
- R src/ui/draw.rs → crates/bench51-tui/src/ui/draw.rs +0 −0
- R src/ui/mod.rs → crates/bench51-tui/src/ui/mod.rs +0 −0
- R src/ui/syntax.rs → crates/bench51-tui/src/ui/syntax.rs +0 −0
| @@ -65,7 +65,7 @@ jobs: | |||
| 65 | 65 | key: ${{ matrix.target }} | |
| 66 | 66 | ||
| 67 | 67 | - name: Build | |
| 68 | − | run: cargo build --release --locked --target ${{ matrix.target }} -p bench51 -p bench51-gui | |
| 68 | + | run: cargo build --release --locked --target ${{ matrix.target }} -p bench51-tui -p bench51-gui | |
| 69 | 69 | ||
| 70 | 70 | - name: Package | |
| 71 | 71 | shell: bash | |
| @@ -19,6 +19,9 @@ All notable changes to bench51. The format follows | |||
| 19 | 19 | ### Changed | |
| 20 | 20 | ||
| 21 | 21 | - Theme moved from the View menu to Settings. | |
| 22 | + | - The terminal app moved from `src/` to `crates/bench51-tui` (package | |
| 23 | + | `bench51-tui`, binary still `bench51`); the repository root is now a | |
| 24 | + | plain workspace. From source: `cargo install --path crates/bench51-tui`. | |
| 22 | 25 | ||
| 23 | 26 | ### Fixed | |
| 24 | 27 | ||
| @@ -483,16 +483,6 @@ version = "0.22.1" | |||
| 483 | 483 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 484 | 484 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" | |
| 485 | 485 | ||
| 486 | − | [[package]] | |
| 487 | − | name = "bench51" | |
| 488 | − | version = "0.2.0" | |
| 489 | − | dependencies = [ | |
| 490 | − | "bench51-core", | |
| 491 | − | "clap", | |
| 492 | − | "ratatui", | |
| 493 | − | "ratatui-textarea", | |
| 494 | − | ] | |
| 495 | − | ||
| 496 | 486 | [[package]] | |
| 497 | 487 | name = "bench51-core" | |
| 498 | 488 | version = "0.2.0" | |
| @@ -509,6 +499,16 @@ dependencies = [ | |||
| 509 | 499 | "serde", | |
| 510 | 500 | ] | |
| 511 | 501 | ||
| 502 | + | [[package]] | |
| 503 | + | name = "bench51-tui" | |
| 504 | + | version = "0.2.0" | |
| 505 | + | dependencies = [ | |
| 506 | + | "bench51-core", | |
| 507 | + | "clap", | |
| 508 | + | "ratatui", | |
| 509 | + | "ratatui-textarea", | |
| 510 | + | ] | |
| 511 | + | ||
| 512 | 512 | [[package]] | |
| 513 | 513 | name = "bit-set" | |
| 514 | 514 | version = "0.5.3" | |
| @@ -1,5 +1,6 @@ | |||
| 1 | 1 | [workspace] | |
| 2 | − | members = ["crates/*"] | |
| 2 | + | resolver = "3" | |
| 3 | + | members = ["crates/bench51-core", "crates/bench51-tui", "crates/bench51-gui"] | |
| 3 | 4 | ||
| 4 | 5 | [workspace.package] | |
| 5 | 6 | version = "0.2.0" | |
| @@ -12,21 +13,6 @@ unsafe_code = "forbid" | |||
| 12 | 13 | bench51-core = { path = "crates/bench51-core" } | |
| 13 | 14 | clap = { version = "4.5.54", features = ["derive"] } | |
| 14 | 15 | ||
| 15 | − | [package] | |
| 16 | − | name = "bench51" | |
| 17 | − | version.workspace = true | |
| 18 | − | edition.workspace = true | |
| 19 | − | description = "A TUI Intel 8051 assembler, simulator and debugger" | |
| 20 | − | ||
| 21 | − | [dependencies] | |
| 22 | − | bench51-core.workspace = true | |
| 23 | − | clap.workspace = true | |
| 24 | − | ratatui = "0.30" | |
| 25 | − | ratatui-textarea = "0.9" | |
| 26 | − | ||
| 27 | − | [lints] | |
| 28 | − | workspace = true | |
| 29 | − | ||
| 30 | 16 | # egui and wgpu are unusably slow without optimisation; keep our own crates | |
| 31 | 17 | # quick to rebuild. | |
| 32 | 18 | [profile.dev.package."*"] | |
| @@ -120,7 +120,7 @@ Prebuilt binaries cover Linux (x86_64, aarch64), Windows (x86_64) and macOS | |||
| 120 | 120 | ||
| 121 | 121 | ```bash | |
| 122 | 122 | cargo install --locked --git https://github.com/krolyxon/bench51 bench51-gui # the desktop app | |
| 123 | − | cargo install --locked --git https://github.com/krolyxon/bench51 bench51 # the terminal app | |
| 123 | + | cargo install --locked --git https://github.com/krolyxon/bench51 bench51-tui # the terminal app (bench51) | |
| 124 | 124 | ``` | |
| 125 | 125 | ||
| 126 | 126 | ## Usage | |
| @@ -288,7 +288,7 @@ Letter shortcuts work too, for terminals that swallow function keys: | |||
| 288 | 288 | ||
| 289 | 289 | ```bash | |
| 290 | 290 | cargo run --release -p bench51-gui # the desktop app | |
| 291 | − | cargo run --release -p bench51 # the terminal app | |
| 291 | + | cargo run --release -p bench51-tui # the terminal app | |
| 292 | 292 | cargo test --workspace # assembler, CPU, peripheral, session and example-program tests | |
| 293 | 293 | cargo clippy --workspace --all-targets | |
| 294 | 294 | ``` | |
| @@ -305,12 +305,12 @@ every target. It publishes the archives and `SHA256SUMS` with that | |||
| 305 | 305 | changelog section as the release notes, then installs the result with the | |
| 306 | 306 | one-liners on Linux, macOS and Windows. | |
| 307 | 307 | ||
| 308 | − | Code layout: | |
| 308 | + | Code layout, one crate per part under `crates/`: | |
| 309 | 309 | ||
| 310 | − | - `crates/bench51-gui/` is the `bench51-gui` desktop app (egui). | |
| 311 | − | - `src/` is the `bench51` terminal app (ratatui), including headless | |
| 312 | − | assembly. | |
| 313 | − | - `crates/bench51-core/`, shared by both: `isa.rs` (opcode table), `asm/` | |
| 310 | + | - `bench51-gui/` builds the `bench51-gui` desktop app (egui). | |
| 311 | + | - `bench51-tui/` builds the `bench51` terminal app (ratatui), including | |
| 312 | + | headless assembly. | |
| 313 | + | - `bench51-core/`, shared by both: `isa.rs` (opcode table), `asm/` | |
| 314 | 314 | (assembler, listing, Intel HEX), `sim/` (CPU, peripherals, disassembler), | |
| 315 | 315 | `session.rs` (build, run, step and breakpoints), `syntax.rs` | |
| 316 | 316 | (highlighting tokens), `files.rs` (HEX loading) | |
| @@ -0,0 +1,18 @@ | |||
| 1 | + | [package] | |
| 2 | + | name = "bench51-tui" | |
| 3 | + | version.workspace = true | |
| 4 | + | edition.workspace = true | |
| 5 | + | description = "A TUI Intel 8051 assembler, simulator and debugger" | |
| 6 | + | ||
| 7 | + | [[bin]] | |
| 8 | + | name = "bench51" | |
| 9 | + | path = "src/main.rs" | |
| 10 | + | ||
| 11 | + | [dependencies] | |
| 12 | + | bench51-core.workspace = true | |
| 13 | + | clap.workspace = true | |
| 14 | + | ratatui = "0.30" | |
| 15 | + | ratatui-textarea = "0.9" | |
| 16 | + | ||
| 17 | + | [lints] | |
| 18 | + | workspace = true | |
| @@ -8,7 +8,7 @@ use clap::Parser; | |||
| 8 | 8 | ||
| 9 | 9 | /// Intel 8051 assembler, simulator and TUI debugger. | |
| 10 | 10 | #[derive(Parser, Debug)] | |
| 11 | − | #[command(version, about)] | |
| 11 | + | #[command(name = "bench51", version, about)] | |
| 12 | 12 | struct Args { | |
| 13 | 13 | /// Assembly source (.asm) or Intel HEX (.hex) file to open. | |
| 14 | 14 | file: Option<PathBuf>, | |
[No content changes]
[No content changes]
[No content changes]
[No content changes]