Packages
An Alternera pipeline step that runs JavaScript (QuickJS compiled to WebAssembly), on the WebAssembly framework.
Current section
Files
Jump to
Current section
Files
alternera_plugin_javascript
README.md
README.md
# alternera_plugin_javascript
The JavaScript pipeline step (`Alternera.Plugins.Javascript`, plugin
id `"javascript"`): a script written as the body of a function, run in a
fresh WebAssembly instance per call on `alternera_plugin_wasm_framework`.
Installed only with `:experimental_plugins` set.
- `priv/javascript.wasm`: the built module, committed with its SHA-256
(`priv/javascript.wasm.sha256`), so nothing here needs a WebAssembly
toolchain. `guest/build.sh` rebuilds it from `guest/javascript_guest.c`,
`guest/prelude.js` (the script's API) and pinned QuickJS sources, with
wasi-sdk 34.0 and Wizer 10.0.0; any other version is refused.
- `lib/`: the plugin, its editor (the framework's `StepEditor`) and the
colouring it registers with the proxy's code editor.
- `docs/`: the user guide page (`javascript.md`), the assistant's notes
(`guide.md`) and the internals chapter (`internals.adoc`, included by the
repository's `docs/internals.adoc`).
`test/` checks the plugin against the framework's language contract and
its own API list with no proxy around (`mix test`).
## Licence
Licensed under the Apache License, Version 2.0 (`LICENSE`, `NOTICE`).
Alternera itself, the proxy this package plugs into, is under the Elastic
License 2.0.
The third-party software it bundles (QuickJS, Unicode data, wasi-libc and
musl) is listed with its licences in `priv/THIRD_PARTY_NOTICES.txt`.