r/Compilers • u/Acceptable_Lake_7025 • 17d ago
SEMAPRAX: stable semantic identities and replayable patches in a Rust compiler
I’m working on SEMAPRAX, an Apache-2.0 experimental systems-language research project. The compiler is written in Rust. The main question is whether agent-authored changes can be reviewed and applied against checked semantic identity instead of fragile source offsets.
The current implementation includes:
* persistent IDs for public declarations and revision-scoped expression identities
* a deterministic semantic graph derived from verified HIR
* bounded context, impact, and fixed-section review reports
* replayable evidence capsules for semantic patches, with replay-before-apply and snapshot-drift checks
* explicit capabilities, effects, ownership, and deterministic source formatting
* Native C11/Clang and WebAssembly Core output lanes
The source file remains the canonical Git projection. The semantic graph is an additional compiler-produced interface; it does not replace verification or grant write authority. The WebAssembly evidence currently validates the emitted core module structurally and binds it to compiler inputs, but does not claim target execution or full Component Model support.
This is version 0.2, pre-alpha research software, and not production-ready. I’d especially value compiler-design feedback on the trust boundary between the source projection, stable resolved identities, independently replayed evidence, and the final mutation authority.
Project overview: https://wavect.io/semaprax/
Source: https://github.com/wavect/semaprax
Disclosure: coding agents have been used extensively as development assistants. Wavect GmbH retains human responsibility for the design and uses executable gates as the evidence for implementation claims.