v0.14.9 — Conditional Compilation + Hex Parser Fix
v0.14.9 — 2026-06-10
New: #[cfg(feature = "...")] Conditional Compilation
Zeta now supports feature-gated compilation via the #[cfg(...)] attribute system. This is essential for large multi-module packages where you want to select which components to build.
CLI Usage:
zetac my_program.z --features "xxh64,xxh3" -o output
Supported cfg predicates:
feature = "name"— enabled whennameis passed via--featuresany(feature = "a", feature = "b")— true if any predicate matchesall(feature = "a", feature = "b")— true if all predicates matchnot(feature = "name")— true if feature is NOT enabledtarget_os,target_arch,target_family— checked against build host
Modules added:
src/frontend/cfg.rs— cfg predicate evaluator + FeatureSet
Parser changes:
top_level.rs:parse_modchecks cfg before building module AST; gated items produceAstNode::Skip(filtered out at top level)parser.rs:cfg_should_skip()helperast.rs:Skipvariant for filtered itemsevaluator.rs: Skip passthrough in CTFE
Fix: Hex literal parsing ≥ 0x8000000000000000
i64::from_str_radix silently rejects values exceeding i64::MAX, causing large hex constants (MSB set) to parse as zero. This broke xxhash constants (P1, P2, P4) and any code using hex literals ≥ 2^63.
Fix: u64::from_str_radix(...) as i64 — parses as unsigned 64-bit, then reinterprets bits as signed via the as cast.
Affected file: src/frontend/parser/expr.rs:137
Full Changelog
b720cd24Add #[cfg(feature)] support with --features CLI flag7953beaeFix hex literal parsing for values ≥ 0x8000000000000000