- mrpgi-core: ureq/tiny_http/threads are native-only deps; the AI lane compiles to an always-off stub on wasm32 (deterministic parser stays). - World::from_memory + assets::cel_from_bytes — boot a game with no filesystem. - mrpgi GUI on wasm: embeds games/lost-fuse via include_dir, boots straight into Play (Tab still opens the editor; saving needs a disk, so web is play + paint-only for now). - web/: index.html shell + macroquad JS loader + build.sh producing a self-contained static web/dist (1.1 MB total, game included). - .cargo/config.toml: --allow-undefined for miniquad's JS imports. Verified in-browser: renders, typed commands reach the parser, click-to-walk works, zero console errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
11 lines
445 B
Bash
Executable File
11 lines
445 B
Bash
Executable File
#!/bin/sh
|
|
# Build the browser version of MRPGI into web/dist/ (self-contained, static).
|
|
# Requires the wasm target: rustup target add wasm32-unknown-unknown
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
cargo build -p mrpgi --release --target wasm32-unknown-unknown
|
|
mkdir -p web/dist
|
|
cp target/wasm32-unknown-unknown/release/mrpgi.wasm web/dist/
|
|
cp web/index.html web/mq_js_bundle.js web/dist/
|
|
echo "web build ready: $(du -sh web/dist | cut -f1) in web/dist/"
|