# Building the served engine This is the Corresponding Source (GNU GPL v3, section 1) of the files that maaneby.dk sends to the browser. It was assembled for these commits: engine cf219085303796c9967fed534d64273e72669d8e (engine/) filextra4 2f16929c68f5d774f97dd008bac9d8389395db41 (filextra4/) The engine is dirplayer-rs with its own changes (upstream: github.com/igorlira/dirplayer-rs). `engine/LICENSE` is the GPL v3 text. Third-party notices are in THIRD-PARTY-NOTICES.txt on the same site. ## What the served files are game/polyfill-dist/dirplayer-vm.wasm engine/dist-polyfill/dirplayer-vm.wasm game/polyfill-dist/dirplayer-vm.wasm.br the same bytes as brotli, quality 11, window 24 game/polyfill-dist/dirplayer-polyfill.js engine/dist-polyfill/dirplayer-polyfill.js game/polyfill-dist/filextra4_xtra.wasm filextra4/xtras/filextra4-xtra/target/wasm32-unknown-unknown/release/filextra4_xtra.wasm ## Toolchain used for the check build (pinned versions) rustc rustc 1.98.0 (88d9e12ae 2026-08-18) cargo cargo 1.98.0 (797e8a9bc 2026-08-05) wasm-pack wasm-pack 0.14.0 wasm-bindgen CLI wasm-bindgen 0.2.108 wasm-opt wasm-opt version 132 (version_132) node v24.11.1 npm 11.18.0 The Rust target is wasm32-unknown-unknown (`rustup target add wasm32-unknown-unknown`). Crate versions are fixed by `engine/vm-rust/Cargo.lock`, npm versions by `engine/package-lock.json`. wasm-bindgen CLI must equal the wasm-bindgen crate in the lockfile. wasm-opt flags are in `engine/vm-rust/Cargo.toml` (`package.metadata.wasm-pack.profile.release`). ## Commands Engine and JS glue (about 11 minutes for the Rust part on a fast PC): cd engine npm ci # sh / bash: DIRPLAYER_ALLOWED_HOSTS=maaneby.dk,maaneby.pages.dev node scripts/build-vm-locked.mjs DIRPLAYER_WASM_FILE=1 npx vite build -c vite.config.polyfill.js # PowerShell: # $env:DIRPLAYER_ALLOWED_HOSTS = "maaneby.dk,maaneby.pages.dev"; node scripts/build-vm-locked.mjs # $env:DIRPLAYER_WASM_FILE = "1"; npx vite build -c vite.config.polyfill.js `DIRPLAYER_ALLOWED_HOSTS` is read at compile time (`vm-rust/src/hostlock.rs`): the engine only starts on those hosts and their subdomains, plus localhost. For an engine without the host check, run `cd vm-rust && wasm-pack build --target web` instead of `build-vm-locked.mjs`. The script also remaps the build machine's absolute paths, so they do not end up in the wasm. The first command writes `vm-rust/pkg/`; the second reads `vm-rust/pkg/vm_rust_bg.wasm` and writes `dist-polyfill/`. The FileXtra4 plug-in: cd filextra4/xtras/filextra4-xtra cargo build --target wasm32-unknown-unknown --release --locked ## What a rebuild gives you The JS bundle is byte for byte reproducible: built from this tree against the served wasm, `dirplayer-polyfill.js` has the same SHA-256 as the served file. This archive keeps text files with CRLF line endings, as the build tree had them (git on Windows with core.autocrlf=true). Converted to LF the bundle comes out a few bytes smaller (536.16 against 536.17 KiB) and otherwise the same; the wasm was the same bytes with either. `filextra4_xtra.wasm` rebuilt from this archive (in a short directory path) has the same SHA-256 as the served file. `dirplayer-vm.wasm` rebuilt from this archive comes out within one byte of the served size, with the same functions in a different order, so its SHA-256 may not match the served file's. Measured on one rebuild in a different directory: the type, import, memory and global sections matched, the code section had the same length, and the function, export, element and code sections differed in byte order. The same source gave the same bytes twice in that directory, with LF or CRLF line endings. `build-vm-locked.mjs` passes the build directory to rustc as a flag, which Cargo hashes into symbol names; building in the directory the served file was built in is the only known way to get the same bytes, and was not tried. ## Not in this archive The movies the engine plays, the web page that hosts the engine, and this site's deploy tooling are separate from the engine and are not part of this source offer. The code behind the cargo features the build above leaves off is not part of the program this site sends, so its files are not in this archive either. Those features are: all-optional, alloc-debug-overlay, bobba-groove, flash, js-lingo, physics-havok, physics-physx, shockwave3d, word_hard_break, xtra-leechprotection, xtra-multiuser Turning on a feature that has files listed below breaks the build of this tree, because those files are missing. A feature listed with no file of its own gates code only inside files the build compiles; that code stays, as written. The 71 files left out, by the feature that brings each in, as the cfg attributes and `engine/vm-rust/Cargo.toml` at the engine commit give them (a file that either of two features brings in is listed under both): all-optional (no file of its own) alloc-debug-overlay (no file of its own) bobba-groove (3) engine/vm-rust/src/player/xtra/scene3d.rs engine/vm-rust/src/rendering_gpu/webgl2/mesh3d.rs engine/vm-rust/src/rendering_gpu/webgl2/xtra_scene.rs flash (1) engine/vm-rust/src/player/handlers/datum_handlers/flash_object.rs js-lingo (15) engine/vm-rust/src/player/handlers/datum_handlers/js_object.rs engine/vm-rust/src/player/js_lingo/builtins.rs engine/vm-rust/src/player/js_lingo/decompiler.rs engine/vm-rust/src/player/js_lingo/disasm.rs engine/vm-rust/src/player/js_lingo/host_bridge.rs engine/vm-rust/src/player/js_lingo/interp_tests.rs engine/vm-rust/src/player/js_lingo/interpreter.rs engine/vm-rust/src/player/js_lingo/mod.rs engine/vm-rust/src/player/js_lingo/opcodes.rs engine/vm-rust/src/player/js_lingo/test_fixtures.rs engine/vm-rust/src/player/js_lingo/tests.rs engine/vm-rust/src/player/js_lingo/value.rs engine/vm-rust/src/player/js_lingo/variable_length.rs engine/vm-rust/src/player/js_lingo/xdr.rs engine/vm-rust/src/player/js_lingo_loader.rs physics-havok (7) engine/vm-rust/src/player/handlers/datum_handlers/cast_member/havok.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/havok_physics.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/hke_parser.rs engine/vm-rust/src/player/handlers/datum_handlers/havok_object.rs engine/vm-rust/src/player/havok_state.rs engine/vm-rust/tests/e2e/havok_demo/mod.rs engine/vm-rust/tests/e2e/havok_demo/properties.rs physics-physx (15) engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_engine.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_gu.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_gu_capsule_box.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_gu_convex.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_gu_heightfield.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_gu_mesh.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_gu_raycast.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_gu_rtree.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_helpers.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_native.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/physx_soa_solver.rs engine/vm-rust/src/player/handlers/datum_handlers/physx_object.rs engine/vm-rust/src/player/physx_state.rs engine/vm-rust/tests/physx.rs shockwave3d (22) engine/vm-rust/src/director/chunks/w3d/bitstream.rs engine/vm-rust/src/director/chunks/w3d/block_reader.rs engine/vm-rust/src/director/chunks/w3d/block_types.rs engine/vm-rust/src/director/chunks/w3d/clod_decoder.rs engine/vm-rust/src/director/chunks/w3d/clod_types.rs engine/vm-rust/src/director/chunks/w3d/gltf_export.rs engine/vm-rust/src/director/chunks/w3d/merge.rs engine/vm-rust/src/director/chunks/w3d/mod.rs engine/vm-rust/src/director/chunks/w3d/parser.rs engine/vm-rust/src/director/chunks/w3d/primitives.rs engine/vm-rust/src/director/chunks/w3d/raycast.rs engine/vm-rust/src/director/chunks/w3d/skeleton.rs engine/vm-rust/src/director/chunks/w3d/subdivision.rs engine/vm-rust/src/director/chunks/w3d/text3d.rs engine/vm-rust/src/director/chunks/w3d/types.rs engine/vm-rust/src/player/handlers/datum_handlers/cast_member/shockwave3d.rs engine/vm-rust/src/player/handlers/datum_handlers/shockwave3d_object.rs engine/vm-rust/src/player/shockwave3d_state.rs engine/vm-rust/src/rendering_gpu/webgl2/mesh3d.rs engine/vm-rust/src/rendering_gpu/webgl2/scene3d.rs engine/vm-rust/tests/e2e/gorillaz/finaldrive.rs engine/vm-rust/tests/e2e/gorillaz/mod.rs word_hard_break (no file of its own) xtra-leechprotection (no file of its own) xtra-multiuser (9) engine/vm-rust/src/player/xtra/multiuser/blowfish.rs engine/vm-rust/src/player/xtra/multiuser/mod.rs engine/vm-rust/src/player/xtra/multiuser/reader.rs engine/vm-rust/src/player/xtra/multiuser/types.rs engine/vm-rust/src/player/xtra/multiuser/writer.rs engine/vm-rust/tests/multiuser/binary_read.rs engine/vm-rust/tests/multiuser/binary_write.rs engine/vm-rust/tests/multiuser/blowfish.rs engine/vm-rust/tests/multiuser/mod.rs The third-party notices and licence texts that apply only to those files are left out with them. `NOTICE` and `engine/NOTICE` are the engine commit's NOTICE without these entries, and with one paragraph that says what this archive left out; every other file under `engine/` is as at the commit: NOTICE section entry c) Intel U3D Sample Software, https://github.com/ningfei/u3d NOTICE section entry d) NVIDIA PhysX 3.4 engine/LICENSES/Apache-2.0.txt engine/LICENSES/BSD-3-Clause-PhysX.txt