Skip to content

v0.1.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 31 Aug 10:22
· 82 commits to main since this release
v0.1.0

M0, the skeleton. The compiler does not compile anything: rucc a.c prints the phase plan and then says the phases are not implemented. What this release is for is the shape everything else gets built inside, and the checks that keep that shape honest.

Added

  • The workspace: 23 library crates, the rucc binary, the rule DSL and its verifier under build-tools/, and the target-side runtime under runtime/.
  • The layer rule, ranked in xtask/layers.toml and enforced by cargo xtask layers.
  • rucc --print-config, --version and --help, which is the M0 exit criterion in spec/17-milestones.md.
  • Target triple parsing and the target data model for x86-64, AArch64 and RISC-V 64 across Linux, Apple platforms and Windows.
  • Diagnostics, spans and the per-compilation Session.
  • CI on Linux, macOS and Windows, with formatting, lints, tests, the layer check, the prose check, a supply chain audit and a minimum supported Rust version job.
  • The twenty document specification under spec/.
  • The phase graph: Plan is pure data, so -### can print the plan without touching the file system, -v prints it while running, and -x forces an input language.
  • Job scheduling across translation units, with -j. Results merge in input order rather than completion order, which is what keeps output byte identical between -j1 and -j16.
  • Translation phases 1 to 3: the byte order mark, line ending normalisation, trigraphs behind -trigraphs, line splicing, comments, and preprocessing token formation, with identifiers interned during the scan.

Known limits

Nothing compiles C yet. The preprocessor and the parser land in M1 and M2.

-j changes the worker count that -v reports and nothing else, because the work it schedules is still a placeholder.

The lexer reads a file into memory rather than mapping it, and skips whitespace and comment bodies a byte at a time. Both are M1 performance items with a benchmark attached.

The workspace is being published to crates.io at 0.1.0. crates.io rate limits new crate names, so the 25 crates go up over a few hours rather than at once; cargo install rucc works once the last of them lands.

What's Changed

  • Move to the newest runner images and action releases by @tamnd in #13
  • Lexer: translation phases 1 to 3 by @tamnd in #16
  • Driver: the phase graph, -x, and -### to print it by @tamnd in #14
  • Release 0.1.0 by @tamnd in #17

Full Changelog: https://github.com/tamnd/rucc/commits/v0.1.0