4 ms·
> Zig's `comptime` must be evaluated at compile time. Yes, and the equivalent in Rust is any constant context, such as a const item, or a const block inside of
by kibwen 2y ago
> Zig's `comptime` must be evaluated at compile time.
Yes, and the equivalent in Rust is any constant context, such as a const item, or a const block inside of a non-const function. Anything in a constant context is guaranteed to run at compile-time.