rucc_rules/lib.rs
1//! The rule DSL compiler.
2//!
3//! Design: `spec/09-optimizer.md` and `spec/10-backend.md`. Outside the layer stack: this is
4//! a build dependency, never a runtime one.
5//!
6//! Middle-end rewrites and instruction selection patterns are written once, in one language,
7//! and this crate compiles them into the matching code the compiler runs. The same rule text
8//! is what `rucc-verify` discharges against an SMT solver, which is the point: a rule that is
9//! verified and a rule that is applied cannot drift apart if they are the same text.
10//!
11//! # Status
12//!
13//! Not implemented. The DSL, its compiler and its verifier are built together in `M3`,
14//! because `spec/10-backend.md` says retrofitting verification onto an existing rule set is
15//! the thing not to do.
16
17#![doc(html_root_url = "https://docs.rs/rucc-rules/0.1.0")]
18
19/// The milestone in `spec/17-milestones.md` that fills this crate in.
20pub const MILESTONE: &str = "M3";
21
22#[cfg(test)]
23mod tests {
24 #[test]
25 fn milestone_is_recorded() {
26 assert_eq!(super::MILESTONE, "M3");
27 }
28}