# Supporting Mojo 1.0 and nightly in the same codebase

**URL:** <https://forum.modular.com/t/supporting-mojo-1-0-and-nightly-in-the-same-codebase/3478>\
**Category:** Mojo\
**Created:** [September 8, 2026, 9:26pm UTC](https://forum.modular.com/t/supporting-mojo-1-0-and-nightly-in-the-same-codebase/3478 "2026-09-08T21:26:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mseritan](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/mseritan/32/130_2.png) [@mseritan](https://forum.modular.com/u/mseritan)\
**Post date:** [September 8, 2026, 9:26pm UTC](https://forum.modular.com/t/supporting-mojo-1-0-and-nightly-in-the-same-codebase/3478/1 "2026-09-08T21:26:57Z")

</div>

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

> **[One source tree, two Mojo versions — magmalake](https://mlake.dev/blog/one-source-tree-two-toolchains/)**
>
> Mojo 1.0 and nightly will diverge over time. Here is one possible pattern on how to handle that.

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](https://github.com/modular/modular/issues/7096)
