retrowin32 can build the emulator as a WebAssembly bundle. There is a central
Host
abstraction (see win32 docs) that collects
functions exposed by the hosting environment, and on web these mostly forward
out to TypeScript implementations.
(Why TypeScript? The edit-compile cycle and debugging experience of using TypeScript is currently a lot better than Rust.)
There are two web frontends that share the emulator integration logic:
run.html
/run.tsx
is the smaller "run a program" UIdebugger.html
/debugger.tsx
implements the x86 debugger
glue/
-- the Rust library that becomes wasmdebugger/
-- the debugging UI
The retrowin32 website is a mixture of files generated by the appdb tools and some hand-written files which also live in this directory.
The deployed website lives in the pages
Git branch. The deploy.sh
script runs the build process for generated files, which includes the wasm
bundle, the TypeScript, and the appdb. It has some comments about how it expects
to be set up to run.