E - Editions

Rust editions are opt-in language revisions that allow the language to evolve without breaking existing code. Oxide tracks Rust editions because it compiles through the Rust compiler.

You set the edition in Cargo.toml:

[package]
edition = "2021"

What Editions Change

An edition can introduce new keywords, lints, or language rules. Code written for an older edition continues to compile as long as that edition is selected.

Choosing an Edition

For new projects, choose the most recent stable edition supported by your toolchain. For existing projects, keep the edition consistent across crates to avoid unnecessary friction.