Files
vinihcrosaandClaude Opus 4.8 8a21003c37 feat(wasm): add @ymir/wasm package with Node-target Emscripten build
Package the physics engine as an internal @ymir/wasm workspace package
that runs in Node (worker_threads). Parametrize the Emscripten build
(YMIR_WASM_ENVIRONMENT=node, output dir override) so the same C++ core
builds for the server. Expose SimulationEngine interface +
createSimulationEngine() loader mirroring YmirBindings.cpp.

Task: task_01. Tests: 8 passing against the real WASM engine, 100% coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 19:58:08 -03:00

34 lines
664 B
JSON

{
"name": "@ymir/wasm",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist",
"runtime"
],
"scripts": {
"build:wasm": "bash scripts/build-wasm.sh",
"build": "tsc",
"clean": "rm -rf dist runtime",
"test": "vitest run --coverage"
},
"dependencies": {
"@ymir/types": "workspace:*"
},
"devDependencies": {
"@types/node": "^22.0.0",
"typescript": "^5.8.0",
"vitest": "^4.1.9",
"@vitest/coverage-v8": "^4.1.9"
}
}