Restructure front end into a Cargo workspace #1
Loading…
Reference in a new issue
No description provided.
Delete branch "workspace-lexer-crate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Catlang — Cargo workspace (multi-crate)
Catlang is a statically-typed, C-like systems language. There is no compiler
yet; this is the start of the front end, organized as a Cargo workspace so
each concern is an isolated, fully-tested library crate and the eventual
executable is a thin CLI binary on top of them.
Workspace layout
Building and testing
From the workspace root,
cargo buildbuilds every member andcargo testruns every member's test suite (the lexer suite is inline in
scanner.rs).The compiler is intended to bootstrap — be rewritten in Catlang itself —
once the language is stable. Until then, Rust is the host for every pipeline
phase, and each phase is a thin, independently-testable crate in this
workspace. The future executable will be a
clicrate depending on theselibraries.
Layout notes
lexercrate from asingle-crate layout; this move preserves git history (
git mv).(see the rationale at the top of
lexer/src/lexer.rs).LGTM