feat: scaffold Rust crate (edition 2024, serde + jiff)#43
Merged
ropdias merged 1 commit intoJul 5, 2026
Merged
Conversation
Slice 0 of the bottom-up Rust rewrite (inbrace-tech#27): the crate skeleton so every later slice lands its module + test against a green build. - rust/ single binary crate 'tokenline', flat src/, edition 2024, MSRV 1.85. - deps: serde + serde_json + jiff (jiff::Timestamp for ISO-8601, lands slice 3). - panic = "unwind" in the release profile (the final slice's catch_unwind needs it). - main.rs is a stub; lib.rs is the module root. cargo build/run/test green (0 tests).
This was referenced Jul 5, 2026
ropdias
approved these changes
Jul 5, 2026
ropdias
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed and tested locally on WSL2 (rustc 1.96.1). All gates green:
cargo build --locked✅cargo test --locked✅ (0 tests, as expected)cargo clippy --locked --all-targets -- -D warnings✅ (no warnings)cargo fmt --check✅ (no diffs)cargo build --release --locked✅ → 287 KB stripped binary, runs and exits 0
Clean, well-scoped scaffold. A few things I really liked:
- The
bin+libsplit from day one — pure, golden-testable domain inlib.rs
and a thin stateful edge inmain.rs. Exactly the shape the rewrite needs. panic = "unwind"kept explicitly in the release profile, against the usual
"add panic=abort to shrink the binary" advice, because the never-crash design
depends oncatch_unwind. The inline comment makes the intent unmistakable.edition = "2024"andrust-version = "1.85"are internally consistent, and
Cargo.lockis committed (correct for a binary).
Solid base for the stack. Approving. 🚀
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.
Slice 0 / 11 of the bottom-up Rust rewrite tracked in #27 — the crate scaffold.
Each later slice lands one module + its tests against a green build, in dependency order, so CI stays green and any regression is trivial to bisect. This PR is just the skeleton.
rust/single binary cratetokenline, flatsrc/, edition 2024, MSRV 1.85.serde+serde_json+jiff(jiff::Timestampfor ISO-8601 → epoch, first used in slice 3).panic = "unwind"in the release profile — the final slice's top-levelcatch_unwind(never-crash) depends on it.main.rsis a stub,lib.rsis the module root.cargo build/run/testgreen (0 tests).Stacked series — this is the base; subsequent slice PRs target their predecessor and retarget to
mainas each merges.