Skip to content

WebAssembly computers for OpenComputers

Write OpenComputers programs in Rust (or anything that compiles to WebAssembly) and run them next to Lua computers, robots and drones.

wackasm is a WebAssembly interpreter written in Rust. This mod plugs it into OpenComputers: Modernized for Minecraft 1.21.1 (NeoForge) as a new CPU architecture, next to Lua. A wasm computer boots from an EEPROM, runs a shell from a floppy disk, and runs ordinary WASI programs that read files, talk to components and use the internet.

Plays like a Lua computer

Same parts, same EEPROM-and-disk boot, same errors. Switch a CPU to WebAssembly and insert the shell floppy.

Ordinary Rust programs

Build with --target wasm32-wasip1. std::fs, println! and reading stdin just work; the shell passes arguments and a working directory.

Every component, typed

The wackasm-opencomputers crate wraps all 53 component types and 402 methods, plus signals, processes and the internet card.

Saves mid-instruction

Machines are fully suspendable: a world can be saved and reloaded in the middle of a component call, a file read or a running child program.