mirror of
https://github.com/extism/extism.git
synced 2026-01-08 21:38:13 -05:00
Closes #469 This PR adds a github workflow that is triggered by updates to the `kernel/` directory or `runtime/src/extism-kernel.wasm` - it builds the kernel, including using `wasm-strip` and makes a PR against any PR that has a kernel module that doesn't match the expected output. I had considered making this run when the PR is merged into main, but this approach gives us a chance to run CI with the generated wasm file. I think automatically adding a commit would be simpler, but this way seems more transparent. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: zshipko <zshipko@users.noreply.github.com>
Extism kernel
The Extism kernel implements core parts of the Extism runtime in Rust compiled to WebAssembly. This code is a conceptual re-write of memory.rs with the goal of making core parts of the Extism implementation more portable across WebAssembly runtimes.
See lib.rs for more details about the implementation itself.
Building
Because this crate is built using the wasm32-unknown-unknown target, it is a separate build process from the extism-runtime crate.
To build extism-runtime.wasm, strip it and copy it to the proper location in the extism-runtime tree you can run:
$ sh build.sh