Contributing¶
Issues and pull requests are welcome at loumalouomega/MMG-WASM.
Ground rules¶
- Never edit
generated/— it is codegen output (npm run gen); CI fails if it is out of sync with the headers and scripts. - All marshalling lives in
src/runtime.mjs. If you are tempted to hand-write conversion code for one function, extend the descriptor vocabulary and the runtime instead. - Classification fixes (a mis-detected out-parameter, a bulk array) belong
in
scripts/mmg_overrides.py. - The
mmg/submodule is upstream, unmodified. Fixes to MMG itself go to MmgTools/mmg.
Dev loop¶
npm run setup # once
npm run build:wasm # full build (fast after the first time)
npm test # node tests
npm run test:browser # playwright
npm run gen # bindings only (no emcc needed)
npm run docs:serve # live docs preview (pip install -r docs/requirements.txt)
For a debug build: OPT="-O0 -g" npm run build:wasm.
Checklist for PRs¶
npm testandnpm run test:browserpass.npm run genleavesgit status generated/clean (commit regenerated files if your change affects them).- New behaviour has a test in
test/api.test.mjs. - Docs updated when the public API or build changes (
docs/,README.md). mkdocs build --strictsucceeds if you touched docs.
Release (maintainers)¶
- Bump
versioninpackage.json, commit. - Tag
vX.Y.Zand push the tag. - CI builds, tests, verifies tag == package version, and publishes to npm
with provenance. A
workflow_dispatchrun withdry_run: truerehearses the pipeline without publishing.