원클릭으로
wasm-web
Build and debug the WASM browser target and the TypeScript web SDK, including the wasm-pack path and the debugger WebSocket relay
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Build and debug the WASM browser target and the TypeScript web SDK, including the wasm-pack path and the debugger WebSocket relay
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Pick the fastest build/verify command for the change at hand, from cargo check to the full verify gate
Run and troubleshoot the SDK code generation pipeline (./codegen.sh) and the generated-artifact drift gate
How versioning and releases work via release-please, version.txt, and the version pins across the workspace
Dependency flow audit and layer validation for GoudEngine's 5-layer hierarchy
Discover and list available skills in the repository
12-area audit checklist adapted for Rust game engine projects
| name | wasm-web |
| description | Build and debug the WASM browser target and the TypeScript web SDK, including the wasm-pack path and the debugger WebSocket relay |
| user-invocable | true |
The browser build runs the engine as WebAssembly. goud_engine/src/wasm/ is a Layer 5
(FFI) module — the browser boundary, parallel to the C FFI and JNI bridges — exposed to
JavaScript via wasm-bindgen. It backs the web half of the TypeScript SDK
(sdks/typescript/).
Read this when you touch goud_engine/src/wasm/, the TypeScript web SDK, or need to run
or debug a game in the browser. For the wider FFI/WASM patterns see
.agents/rules/wasm-web.md.
wasm32-unknown-unknown only. Code under goud_engine/src/wasm/ MUST compile
without native-only deps; guard native code behind cfg.WasmGame is the JS handle: WasmGame::new(w, h, title) (headless ECS) or
WasmGame::create_with_canvas(canvas, w, h, title) (rendering). Input is push-based:
JS calls press_key() / release_key().sdks/typescript/src/node/) and browser
via WASM (sdks/typescript/src/web/). It is a thin wrapper — no game logic in TS.codegen/gen_ts_web.py emits
sdks/typescript/src/generated/web/. Do not hand-edit .g.ts output.f32 directly (the Node napi path bridges JS f64 ↔ engine f32).wasm-pack is required (see docs/src/development/dev-setup.md); it is optional for
non-web work. From sdks/typescript/:
npm run build:wasm →
wasm-pack build ../../goud_engine --target web --out-dir ../sdks/typescript/wasm --features web --no-default-features.
Output lands in sdks/typescript/wasm/ (goud_engine_bg.wasm, goud_engine.js, typings).npm run build:web → build:wasm then build:ts:web (compiles the web TS with
tsconfig.web.json)../dev.sh --sdk typescript --game flappy_bird_web — regenerates the web SDK, runs
npm run build:web, then serves the repo root over http://localhost:8765 (the port
falls back if occupied). Other web games: feature_lab_web, sandbox_web.dev.sh skips the wasm rebuild when sdks/typescript/wasm/goud_engine_bg.wasm is
fresher than the TypeScript sources, so repeated runs are fast.Native debugger attach uses a local IPC socket; the browser cannot, so the WASM debugger
attaches over a WebSocket relay hosted by the goudengine-mcp server.
9229 by default (ws_relay::DEFAULT_WS_PORT, override with
GOUDENGINE_WS_PORT); the MCP server spawns it at startup
(tools/goudengine-mcp/src/main.rs, relay in tools/goudengine-mcp/src/ws_relay.rs).initDebugger(routeLabel) once after constructing WasmGame.
It registers the context with publish_local_attach: false and connects to the relay.dispatchDebuggerRequest(json) handles each and returns
a JSON response. From there the standard MCP tools work — see the goudengine-debugging
and goudengine-mcp-server skills../codegen.sh and the SDK smoke tests, and keep
parity with the other SDKs.dev.sh prints.index.js / index.d.ts); they are gitignored.