Theseus

A compiler that turns DOS and Win32 executables into Rust source

A static translator that reads a DOS or 32-bit Windows x86 .exe and emits Rust, plus an implementation of the DOS and Win32 APIs it needs, so the program builds with the Rust toolchain into a native binary for any architecture, or for the web through WebAssembly.

Trade-offs

  • It translates ahead of time instead of emulating at run time, so the result is a native program that no longer depends on x86, DOS or Windows.
  • Generated code is not a derivative of Theseus and the support crates are Apache-2.0, so translated programs can be distributed.
  • Very experimental: it likely won't work on a given program, though fixing one may be a small amount of work.

Q&A3

A translate.sh per program runs the translator, a few supporting files are added by hand, and the result builds with normal Rust commands; the out/ directory holds working examples.

Reviews

Loading reviews

    More in Emulators

    See all 6 →
    • RetroTickClassic Windows and DOS programs run in the browser on a TypeScript x86 emulator
    • FuNesA NES emulator in Haskell, built to test functional style on a virtual machine
    • Anemoia-ESP32NES emulator running at native speed on a plain ESP32
    • GeckoA GameCube and Wii emulator and debugger written in Rust
    • Brovanx86_64 emulator for tracing, reversing and sandboxing Windows and Linux binaries
    • nuPSXExperimental PlayStation 1 emulator and debugger written in Zig

    More in Rust

    See all 146 →
    • PaganelData migration engine that verifies the destination down to the row
    • FeOxDBEmbedded key-value store in Rust with write-behind durability
    • AudioRouterVisual audio router for Windows 11: route, process and record on a canvas
    • ai-memoryPersistent memory for MCP clients in one Rust binary over SQLite
    • AntirionAI gateway in one Rust binary, with the admin console built in
    • jc-rsjc rewritten as one static binary that turns command output into JSON

    More in Compilers

    See all 13 →
    • XSProgramming language with its whole toolchain in one static binary
    • ddcAndroid DEX to Java decompiler with a javac parse gate
    • ArityLanguage server, formatter and linter for R
    • gabagoolWebAssembly interpreter whose execution state can be snapshotted and resumed
    • SharpTSTypeScript interpreter and ahead-of-time compiler to .NET IL, written in C#
    • KillSwitchEsoteric language built to be impossible for LLMs