Mojo standard library reorganization

As we approach Mojo 1.0, we will be moving some modules around to better improve dependencies and layering in the Mojo standard library. For many of these, we’ve historically struggled with the right dependency structure and we’re trying to get this right before the launch of Mojo 1.0.

We see the Mojo standard library as the hardware-independent core of a true general-purpose programming language. The Mojo standard library defines the core types and functions of the language, and it makes sense to layer some of these modules on top of that foundation.

These module moves unfortunately may break some of your Mojo code, so we wanted to give you a warning that some library locations may be changing. Specifically, several modules that were previously in the std. namespace will be moving to a new max.namespace, such as std.gpumax.gpu . To continue to use the modules that land in max., you will need to add the maxpackage to your project, but otherwise functionality will remain the same.

This will start happening in the next few nightlies. A few other related packages may be moved or renamed in the process, so please keep an eye on the Mojo changelog while we work on this. Apologies for the dust, we’re still getting everything lined up for Mojo 1.0 and wanted to get this settled in advance of that.

This could be where Mojo could shine as a truly different programming experience

The transition from old to new structure is a very deterministic transformation - the compiler should easily be able to emit detailed warning messages to guide users. Exactly like you are doing with this post, but in the specific context of their code

@deprecation should be a primary primitive in a language that aims to become the next best thing