Description
Configure the quest-rust project to compile to WebAssembly so the game can run in a browser environment without any server-side execution. This dramatically expands reach — players who do not want to install a Rust binary can play directly in the browser. The WASM build should expose a clean JavaScript API wrapping the core session, puzzle, scoring, and hint modules, with the TUI layer replaced by a JS-driven frontend.
Acceptance Criteria
Description
Configure the quest-rust project to compile to WebAssembly so the game can run in a browser environment without any server-side execution. This dramatically expands reach — players who do not want to install a Rust binary can play directly in the browser. The WASM build should expose a clean JavaScript API wrapping the core session, puzzle, scoring, and hint modules, with the TUI layer replaced by a JS-driven frontend.
Acceptance Criteria
wasm-bindgenandwasm-packare added and configured inCargo.tomlwith a[lib]targetwasmfeature flag gates WASM-specific code paths to avoid breaking the native buildwasm-pack build --target webproduces a validpkg/output with.wasmand JS bindingsstartSession(puzzleId),submitAnswer(answer),revealHint(),getScore(),endSession()std::timeis replaced withweb-systime APIs under thewasmfeature flaglocalStorageaccess under thewasmfeature flagindex.htmldemo inweb/loads the WASM module and runs a complete puzzle session in the browsercargo build(native) andwasm-pack buildto prevent regressions on either target