A Pumpkin Minecraft Java server, compiled from Rust to WebAssembly and hosted in a Cloudflare Durable Object. Workers accepts the TCP connection; Pumpkin runs the game; a mounted SQLite filesystem stores the world.
Minecraft → Workers TCP ingress → MinecraftWorld → Pumpkin + SQLite
Linux and macOS build hosts are supported. Install Git, rustup, Python 3.11+, and Node 24+ (26 recommended). From a checkout of this repository:
bash scripts/setup.sh
npm run devSetup installs the pinned Rust toolchain, fetches and patches Pumpkin under
.work/, and installs worker-build, which provisions Emscripten and
wasm-bindgen itself. npm run dev compiles Pumpkin with
worker-build --emscripten and starts Wrangler. The first build takes several
minutes; later builds use Cargo's cache.
Connect Minecraft Java 26.2 to localhost:25565. Status is available at
http://localhost:8787/.
The example uses offline mode with encryption disabled and fast packet compression. Local
listeners bind to loopback. WORLD_NAME in wrangler.jsonc selects
the Durable Object; gameplay settings such as view
distance and the player limit are Worker variables.
World data lives under .data/workers/server/, written through to the Durable
Object's SQLite storage as Pumpkin saves. After the last player leaves, the
server saves and keeps a short reconnect window before stopping; the next
connection starts it on the same world. Server-list pings do not start the
runtime. Wait for status to report phase: "idle" before stopping Wrangler so
the final save completes.
npm run build # Compile the Worker without starting Wrangler
npm test # Two-player gameplay, a persistent block edit, and restart
npm run test:schedulerThe tests use separate data under .data/probes/. They verify that two clients
observe the same block edit and that the edit and player position survive restart.
See development, architecture, and dependency pins for build details and patch maintenance.
After setup, deploy the Worker; Wrangler builds the Rust runtime first:
npx wrangler deployThe Durable Object is declared under exports in wrangler.jsonc as a
SQLite-backed class. Workers TCP ingress maps a public IP and port to the
Worker's connect handler; that mapping is provisioned separately and is tied
to the Worker's name, so deploy under the mapped name. Players connect to the
mapped ip:port. The listener in wrangler.jsonc is for local development.
See memory usage for the optimizations and measurements.
Built on Pumpkin, workers-rs, Tokio, Emscripten, wasm-bindgen, and Guy Bedford's Rust/Emscripten work.
Licensed under GPL-3.0-only, consistent with Pumpkin. The original MIT notice is retained for inherited code. Dependencies retain their own licenses. This is an unofficial project and is not affiliated with Mojang or Microsoft.
