Minimal SpiderMonkey-based JavaScript runner for the GAMS component-model runtime.
This repo builds one artifact:
cmake-build-release/gams-js.wasm
The component exports gams:js/js.run(source: string) -> result<string, string> and imports only gams:runtime/runtime@1.0.0.
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-release --parallel $(sysctl -n hw.ncpu) --target gams-jsOr use the Makefile wrapper:
make buildConfigure wkg to resolve the gams namespace from GHCR:
# ~/.config/wasm-pkg/config.toml
default_registry = "ghcr.io"
[namespace_registries]
gams = { registry = "gams-ghcr", metadata = { preferredProtocol = "oci", oci = { registry = "ghcr.io", namespacePrefix = "kkgams/" } } }Then install the published component with the WIT package name:
wkg get gams:js@1.0.0 --output build.nosync/plugins/js.comp.wasmThis resolves to the canonical OCI package path ghcr.io/kkgams/gams/js:1.0.0.
The release workflow publishes only the canonical OCI package path, tagged as 1.0.0, latest, and a UTC timestamp, for example:
wkg oci pull ghcr.io/kkgams/gams/js:<timestamp> -o build.nosync/plugins/js.comp.wasm
wkg oci pull ghcr.io/kkgams/gams/js:latest -o build.nosync/plugins/js.comp.wasm