For what it’s worth there’s a comptime crate for Rust. Not as elegant as a language level feature but probably accomplishes very much similar things.
https://docs.rs/comptime/latest/comptime/
There are plans to experiment with language level comptime support too: https://github.com/rust-lang/rust/pull/148820
There are plans to experiment with language level comptime support too: https://github.com/rust-lang/rust/pull/148820