MRPCI/.cargo/config.toml
m3ultra 50ede0febf web: MRPCI runs in a browser, as a player
The macroquad GUI now builds for wasm32 the way MRPGI's does, with two
deliberate differences.

It boots into Play and the F8 editor toggle is compiled out of the web
build. What ships to someone playing a game should be the game, not the tool
that made it.

And it embeds a WorldBundle rather than a game *folder*. MRPGI reaches for
include_dir! because its bundle carries only manifest+rooms; MRPCI's already
carries scripts and sprites too, so one `--export-bundle` document is the
whole game. That is also the format MRP3GI boots from, which means one file
now feeds two engines.

mrpci_alloc/mrpci_world_in let the page hand over another bundle while the
engine is running — the arcade picker and drag-and-drop both arrive there,
and the session restarts on the new world.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 14:17:10 +10:00

17 lines
770 B
TOML

# Which game gets baked into wasm builds (WEB_BUNDLE in mrpci/src/main.rs).
# It is a WorldBundle JSON, not a folder: the browser has no filesystem, and
# `mrpci-headless --export-bundle` already writes exactly this document.
# web/build.sh regenerates it and overrides the path per build.
[env]
MRPCI_WEB_BUNDLE = { value = "web/game.bundle.json", relative = true }
# Web builds: miniquad's JS imports (console_log, init_webgl, ...) are
# resolved at runtime by web/mq_js_bundle.js — tell the linker to allow them.
# The mrpci_* exports are the page's game-loading bridge into the engine.
[target.wasm32-unknown-unknown]
rustflags = [
"-C", "link-arg=--allow-undefined",
"-C", "link-arg=--export=mrpci_alloc",
"-C", "link-arg=--export=mrpci_world_in",
]