bimr-wasm/AGENTS.md
2026-08-31 10:12:17 +02:00

1.3 KiB

AGENTS.md — bimr-wasm

WASM adapter for the bimr-engine eval — the compile() surface consumed by bimr-web. Plan: task/refactor/2026-08-13/white_wasm_surface.md.

Commands

make test     # native cargo test (wasm_bindgen fns are plain Rust)
make pkg      # wasm32 build -> wasm-bindgen web pkg -> wasm-opt
make smoke    # pkg + Node smoke test (node/smoke.mjs)

Rules

  • Whole-source only (D8, batch-DSL / Alternative A): the surface is exactly one export, compile(src) — no session API, no per-call construction, no side-query projections. Python emits .bimr text and calls compile() once, the same path as the CLI. The incumbent session bridge was retired with the classic stack (bimr-black).
  • The adapter stays thin: no engine logic here — no geometry pre-pass (meshes compute at serialize time), no lazy materialisation, no parameter parsing. Everything goes through eval's public surface.
  • Errors return {"error": "..."} JSON strings.
  • Dependencies on eval/parser are git pins on bimr-engine with local [patch] overrides — same pattern as the engine's kernel pin.
  • pkg/ and target/ are build artifacts — never commit them.

This document should be updated as the codebase evolves.