Blazingly fast! Y2k compliant! Works everywhere!
rust9x brings the Rust standard library to legacy Windows versions (9x, Me, NT3.1 SP2+). Note that this only includes these systems as target.
rust9x-sample: Sample application
Depending on how far back you'd like to go, there are lots of limitations to keep in mind.
Please note that this is not stable software at all, and does not claim to ever be. Only the standard library is ported. Crates that directly use Windows APIs will need to be patched.
How to build and run the compiler
Building on Linux with MSVC targets: Rust and rust9x
NOTE: There currently is a bug with the VS 2026 toolchain. Make sure to use VS 2022 for the time being: Github Issue
-
Clone this repo and make sure that your preferred version's branch is checked out.
-
Copy
bootstrap.rust9x.tomltobootstrap.toml, edit to suit your needs. Or, if you just want to build it, pass--config bootstrap.rust9x.tomlto thex.pycalls below -
python x.py build --stage 1 -
(Only once) Link the built toolchain to the name
rust9x, e.g. for a stage 1 build:rustup toolchain link rust9x D:\your\path\to\rust9x\rust\build\x86_64-pc-windows-msvc\stage1 -
You can now use
cargo +rust9x <command>/rustc +rust9x <...>to use the new toolchain with the new targets:i586-rust9x-windows-msvc: default target-cpu:pentium(see limitations for floating point support)i686-rust9x-windows-msvc: default target-cpu:pentium4(SSE2)x86_64-rust9x-windows-msvc: should work for x64 builds of Windows XP and up (untested)- Alternatively, you can
rustup override set rust9xin your workspace folder. You might need to build the other tooling (rust-analyzer, rustdoc, clippy, ...) or set up your workflow to instead use another toolchain's tools, e.g. in the VSCode config for the rust-analyzer extension.
-
Have a look at how the sample application configures search paths and linker arguments to bring everything together (see
Cargo.tomland.cargo/config.toml)
Windows NT Workstation 3.1 SP3 (VM) (with r9xrsrt only)

