Supporting Mojo 1.0 and nightly in the same codebase

I wanted to share my current pattern for allowing threads.mojo to support both 1.0 and nightly in one codebase.

With some help from the compiler this could be more ergonomic, maybe Allow `comptime if` at module scope for declaration-only branches · Issue #7096 · modular/modular · GitHub

1 Like