Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust9x logo

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.

Compiling rust9x yourself

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

  1. Clone this repo and make sure that your preferred version's branch is checked out.

  2. Copy bootstrap.rust9x.toml to bootstrap.toml, edit to suit your needs. Or, if you just want to build it, pass --config bootstrap.rust9x.toml to the x.py calls below

  3. python x.py build --stage 1

  4. (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

  5. 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 rust9x in 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.
  6. Have a look at how the sample application configures search paths and linker arguments to bring everything together (see Cargo.toml and .cargo/config.toml)

Building with rust9x

Building with rust9x

rust9x-sample in action (various versoins)

Windows 95 RTM with WinSock2 update (VM)

image

Windows 95 B (real hardware, my Pentium MMX 233MHz machine)

win95

Windows NT Workstation 3.1 SP3 (VM) (with r9xrsrt only)

rust9x on WinNT 3.1 SP3

Windows NT Workstation 3.5 (VM)

image

Windows NT Workstation 3.51 (VM)

image

Windows NT Workstation 4.0 RTM/SP0 (VM)

image

Windows XP SP3 (real hardware)

winxp

Windows 11 Pro Insider (real hardware)

win11

Linux via wine

image

Releases

Packages

Contributors