Contributor-facing notes. For agent guidance see AGENTS.md. For end-user docs see README.md and docs.opengeometry.io.
- Node.js (CI uses 18; any LTS is fine locally)
- Rust toolchain (stable)
wasm-pack—brew install wasm-packon macOS, orcargo install wasm-pack
main/opengeometry/— Rust core compiled to WebAssemblymain/opengeometry-three/— Three.js wrapper (the published TypeScript SDK)main/opengeometry-{webgl,babylon,ios,export-io,export-schema}/— empty scaffoldsdist/— generated NPM bundle (do not edit)
npm install
npm run build # Full pipeline: Rust → WASM → TS bundle → dist/
npm test # Cargo unit + integration tests (no TypeScript tests yet)npm run build runs build-core (wasm-pack + cargo release), build-three (Rollup),
and prepare-dist in order. Running them out of order produces stale pkg/ and bundle
mismatches — see .claude/skills/wasm-build-flow.md if you hit that.
npm --prefix main/opengeometry-three run dev-example-three # Vite dev server
npm --prefix main/opengeometry-three run build-example-three # Static build
npm --prefix main/opengeometry-three run preview-example-three # Preview the buildThe example catalog lives at main/opengeometry-three/examples-vite/. Use it (rather
than copying the build into a sibling repo) for local validation.
- Bump
versionin bothpackage.jsonandmain/opengeometry/Cargo.tomlso they match. - Run the full build + test locally:
npm run build npm test - Push to
main. The GitHub Action at.github/workflows/release.ymldetects the version bump, rebuilds, runs tests (now required to pass), and publishes to NPM if the version is not already on the registry. - The action also creates a GitHub release tagged
v<version>.
If the publish step fails for an environmental reason but the version was already bumped, re-running the workflow will re-attempt publish (the action checks NPM and only publishes if the version is missing).