This repository is a temporary fork of extism/extism for Rust hosts that need
Extism v1.30.0 API compatibility with a wasmtime 46 security baseline before an
official upstream Extism release supports it.
Base upstream: extism/extism tag v1.30.0, commit 7038ad1.
Fork repository: arthurianresolve/extism-with-wasmtime46.
- Rust SDK/runtime source in
runtime/. - The workspace crates needed by that Rust runtime:
runtime,manifest,convert, andconvert-macros. - WASIp1 execution through Extism's existing
wasi-common/wigglepath. - The Extism Rust APIs used by Caliburn's
plugins-wasmintegration: loading a.wasmfile, registering host functions, calling plugin exports, memory exchange helpers, and per-call plugin construction. - A Rust runtime pool fix for concurrent checkout under slow plugin creation.
- Upgraded runtime dependency train:
wasmtime:43->46.0.1wasi-common:43->46.0.1wiggle:43->46.0.1
- Raised the pinned Rust toolchain from
1.91.0to1.97.0because Wasmtime 46 requires Rust1.94.0or newer. - Rechecked the Rust 1.97.0 syntax and lint surface, including the new Clippy
useless_borrows_in_formattinglint in runtime tests; the standalone kernel crate is pinned to the same Rust baseline. - Pinned GitHub workflow Rust setup steps to
1.97.0so CI and release jobs use the same Rust baseline as the checked-in toolchain files. - Updated workspace metadata to identify this fork as
1.30.0+wasmtime46and point repository metadata at this GitHub repository. - Adapted the runtime to Wasmtime 45 and 46 API changes:
Linker::getnow returnsResult<Extern, wasmtime::Error>instead ofOption<Extern>.- Host functions now bridge
anyhow::Errorintowasmtime::ErrorwithToWasmtimeResultwhere Wasmtime requires its own error type. - Runtime error contexts now use
wasmtime::error::Contexton Wasmtime call paths. - Resource limiter and fuel errors now use
wasmtime::Errorinternally and convert back to Extism's publicanyhow::Errorsurface at API boundaries. - Removed deprecated
Config::async_support(false)usage.
- Fixed pool checkout behavior by reserving capacity under the mutex and creating plugins outside the mutex. This prevents unrelated waiters from spending their timeout behind slow Wasmtime plugin compilation.
- Aligned test code with the Rust 1.95 / Wasmtime 45 lint surface by marking a
derive-only conversion fixture with
#[expect(dead_code)]and removing an unnecessary clone from aCopywasmtime::Valin the pool test. - Integrated the cargo dependency refresh that was pending on fork maintenance
branches:
toml:0.9->1.1sha2:0.10->0.11criterion:0.7.0->0.8.2rand:0.9.0->0.10.1schemars:0.8->1.2prost:0.14.1->0.14.4protobuf:3.2.0->4.35.0-release
- Adapted the optional
extism-convertprotobufwrapper to theprotobuf4.x API by replacing the removed 3.xMessage::write_to_bytesandMessage::parse_from_bytescalls withSerialize::serializeandParse::parse. - Rechecked dependency freshness on the
protobuf-4.xbranch on 2026-06-08: the direct Wasmtime, WASI, Wiggle, Prost, and Protobuf floors were current;libcremains on the stable0.2line rather than the1.0.0-alphaline. - Rechecked dependency freshness on the
protobuf-4.xbranch on 2026-07-05 and upgraded the Wasmtime dependency train from45.0.3to46.0.1. - Rechecked dependency freshness on the
protobuf-4.xbranch on 2026-07-10, confirmed fresh compatible Cargo resolution clearsRUSTSEC-2026-0204incrossbeam-epoch, and updated the release workflow Node.js pin from26.1.0to26.5.0. - Adapted fuel-limit handling for Wasmtime 46 so wrapper setup work does not consume the caller's configured guest-execution fuel budget, and failed guest execution resets the store before the next call.
- Checked the public wrapper API surface against the Wasmtime 46 migration:
existing Rust host APIs remain source-compatible, and the generated C header
keeps the existing
EXTISM_PTRspelling without exporting cbindgen's generic RustPTRhelper. - Disabled the implicit Wasmtime default cache configuration lookup on Android
when no cache config is supplied, avoiding
extism/extism#851plugin construction failures while preserving explicitwith_cache_config,EXTISM_CACHE_CONFIG, andwith_cache_disabledbehavior. - Added runtime export discovery for
extism/extism#868viaPlugin::function_names(),Pool::function_names(), and the C ABIextism_plugin_function_names, which returns a JSON array of callable plugin function names. - Hardened plugin teardown for
extism/extism#890:Plugindrop now stops any active timer entry, clears the host-context payload, and releases cached runtime/instance state before the remaining Wasmtime-owned fields are destroyed. - Added host-function timeout controls for
extism/extism#637: Rust host functions can pause, resume, extend, or reduce the active plugin timeout viaCurrentPlugin, and C ABI host functions can use the matchingextism_current_plugin_timeout_*helpers. - Added linked-module regression coverage for
extism/extism#819, ensuring a singleCompiledPlugincan create multiple plugin instances that all retain access to non-main modules imported by the main module. - Added compiled-plugin concurrency regression coverage for
extism/extism#791, ensuring a single sharedCompiledPlugincan create independent plugin instances across threads while preserving per-instance execution state. - Updated the reusable GitHub composite action pins to current workflow
equivalents:
actions/checkout@v6,actions-rust-lang/setup-rust-toolchain@v1,Swatinem/rust-cache@v2, andactions/cache@v5. - Adapted optional manifest JSON Schema generation to the Schemars 1.2 API and updated the Rand property-test import for Rand 0.10.
- Added
SECURITY-WASMTIME46.mddocumenting the Wasmtime advisory baseline and why the fork exists.
The Wasmtime 46 baseline includes the April 2026 Wasmtime advisory set, the
May 2026 WASI permission advisory, and the June 2026 WASI FilePerms advisory.
This fork is intended to clear the Wasmtime
41.x advisory lane that blocked Caliburn while Extism still depended on
Wasmtime ^41.
Covered issue classes include:
- Critical aarch64 Cranelift sandbox escape.
- Critical Winch sandbox escape.
- Component-model string transcoding issues.
- Winch table and data-leakage issues.
- Pooling allocator data leakage.
- WASI
path_open(TRUNCATE)host write-permission bypass. - WASI hard-link and rename destination permission checks.
See SECURITY-WASMTIME46.md for advisory identifiers and links.
This fork is intentionally narrow. It does not cover:
- Published crates.io packages.
libextismC ABI release artifacts or downstream C-ABI package publishing.- Python SDK wheels, Node/npm packages, Java artifacts, .NET/NuGet packages, RubyGems, Packagist packages, CPAN packages, opam packages, or Hackage packages.
- The separate Go SDK or JavaScript SDK repositories.
- Downstream Python SDK wrapper ownership fixes. The Rust runtime/C ABI
extism_plugin_freeteardown path has been hardened forextism/extism#890, but Python SDK package code is outside this fork. - WASI Preview 2, the Component Model, or WIT-based plugin interfaces.
- WASI threads support.
- Async cancellation support for guest code blocked in uninterrupted sleeps or long-running host functions.
allowed_pathsredesign, single-file mounts, or breaking manifest path semantics.- New observability/Observe SDK integration.
- A new runtime API for listing all exported plugin functions.
The fork was validated with:
cargo check -p extismCARGO_INCREMENTAL=0 cargo test -p extismcargo fmt --all -- --checkCARGO_INCREMENTAL=0 cargo clippy -p extism -- -D warningscargo audit
Additional Rust 1.95 syntax and lint alignment was validated with:
cargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo test -p extism-convert test -- --nocapturecargo test -p extism test_pool_with_captured_builder -- --nocapture
The full parallel Rust runtime test suite passed after the pool checkout fix.
The cargo dependency refresh was validated with:
cargo fmt --all -- --checkcargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo check -p extism-manifest --features json_schema --examplescargo check -p extism-convert --features protobufcargo test -p extism-convert --features protobufcargo updatecargo test -p extism test_toml_manifest -- --nocapturecargo test -p extism check_alloc_with_load_and_store -- --nocapturecargo test -p extism --benches --no-runCARGO_INCREMENTAL=0 CARGO_BUILD_JOBS=1 cargo bench -p extism --no-run
The Wasmtime 46 upgrade and API-surface compatibility pass was validated with:
cargo test -p extismcargo check -p extism --no-default-featurescargo check --workspacecargo check -p extism-convert --features protobufcargo test -p extism-convert --features protobufcargo check --manifest-path kernel/Cargo.toml --target wasm32-unknown-unknowncargo fmt --all -- --check
The Rust 1.97.0 toolchain bump was syntax-checked with:
cargo fmt --all -- --checkcargo check --workspacecargo check -p extism --no-default-featurescargo check -p extism-convert --features protobufcargo clippy --workspace --all-targets -- -D warningscargo check --manifest-path kernel/Cargo.toml --target wasm32-unknown-unknowncargo auditcargo test -p extism
The Android default cache config fallback fix for extism/extism#851 was
validated with:
cargo test -p extism android_skips_implicit_default_cache_configcargo check -p extism --no-default-featurescargo clippy -p extism --all-targets -- -D warningscargo fmt --all -- --check
The runtime export discovery API for extism/extism#868 was validated with:
cargo test -p extism test_function_namescargo test -p extism test_c_api_function_namescargo test -p extism pool::test_existscargo check --workspacecargo check -p extism --no-default-featurescargo clippy -p extism --all-targets -- -D warningscargo fmt --all -- --check
The plugin teardown hardening for extism/extism#890 was validated with:
cargo test -p extism test_plugin_teardown_clears_cached_instancecargo test -p extism test_c_api_plugin_free_repeated_creationcargo fmt --all -- --checkcargo check --workspacecargo check -p extism --no-default-featurescargo clippy -p extism --all-targets -- -D warningscargo test -p extism
The host-function timeout controls for extism/extism#637 were validated with:
cargo test -p extism test_host_function_can_pause_timeoutcargo test -p extism test_c_api_host_function_can_extend_timeoutcargo fmt --all -- --checkcargo check --workspacecargo check -p extism --no-default-featurescargo clippy -p extism --all-targets -- -D warningscargo test -p extism
The compiled-plugin linked-module regression for extism/extism#819 was
validated with:
cargo test -p extism test_linkingcargo test -p extism test_compiled_plugin_linkingcargo fmt --all -- --checkcargo check --workspacecargo check -p extism --no-default-featurescargo clippy -p extism --all-targets -- -D warningscargo test -p extism
The compiled-plugin concurrency regression for extism/extism#791 was
validated with:
cargo test -p extism test_compiled_plugin_concurrent_instancescargo test -p extism test_plugin_threadscargo test -p extism pool::test_threadscargo fmt --all -- --checkcargo check --workspacecargo check -p extism --no-default-featurescargo clippy -p extism --all-targets -- -D warningscargo test -p extism
The 2026-07-10 dependency security check and Node.js 26.5.0 release workflow pin were validated with:
cargo auditcargo fmt --all -- --checkcargo check --workspacecargo check -p extism --no-default-featurescargo clippy -p extism --all-targets -- -D warningscargo test -p extism
Prefer returning to upstream Extism as soon as an official release supports the required Wasmtime security baseline.
Extism is a lightweight framework for building with WebAssembly (Wasm). It supports running Wasm code on servers, the edge, CLIs, IoT, browsers and everything in between. Extism is designed to be "universal" in that it supports a common interface, no matter where it runs.
Note: One of the primary use cases for Extism is building extensible software & plugins. You want to be able to execute arbitrary, untrusted code from your users? Extism makes this safe and practical to do.
Additionally, Extism adds some extra utilities on top of standard Wasm runtimes. For example, we support persistent memory/module-scope variables, secure & host-controlled HTTP without WASI, runtime limiters & timers, simpler host function linking, and more. Extism users build:
- plug-in systems
- FaaS platforms
- code generators
- web applications
- & much more...
We currently provide releases for the following targets:
- aarch64-apple-darwin
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- x86_64-apple-darwin
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
For Android we suggest taking a look at the Chicory SDK for a pure Java Extism runtime.
Pick a SDK to import into your program, and refer to the documentation to get started:
| Type | Language | Source Code | Package |
|---|---|---|---|
| Rust SDK | https://github.com/extism/extism/tree/main/runtime | Crates.io | |
| JS SDK | https://github.com/extism/js-sdk (supports Web, Node, Deno & Bun!) |
NPM | |
| Elixir SDK | https://github.com/extism/elixir-sdk | Hex | |
| Go SDK | https://github.com/extism/go-sdk | Go mod | |
| Haskell SDK | https://github.com/extism/haskell-sdk | Hackage | |
| Java SDK | https://github.com/extism/java-sdk | Sonatype | |
| .NET SDK | https://github.com/extism/dotnet-sdk (supports C# & F#!) |
Nuget | |
| OCaml SDK | https://github.com/extism/ocaml-sdk | opam | |
| Perl SDK | https://github.com/extism/perl-sdk | CPAN | |
| PHP SDK | https://github.com/extism/php-sdk | Packagist | |
| Python SDK | https://github.com/extism/python-sdk | PyPi | |
| Ruby SDK | https://github.com/extism/ruby-sdk | RubyGems | |
| Zig SDK | https://github.com/extism/zig-sdk | N/A | |
| C SDK | https://github.com/extism/extism/tree/main/libextism | N/A | |
| C++ SDK | https://github.com/extism/cpp-sdk | N/A |
Extism Hosts (running the SDK) must execute WebAssembly code that has a
PDK, or Plug-in Development Kit, library
compiled in to the .wasm binary. PDKs make it easy for plug-in / extension
code authors to read input from the host and return data back, read provided
configuration, set/get variables, make outbound HTTP calls if allowed, and more.
Pick a PDK to import into your Wasm program, and refer to the documentation to get started:
| Type | Language | Source Code | Package |
|---|---|---|---|
| Rust PDK | https://github.com/extism/rust-pdk | Crates.io | |
| JS PDK | https://github.com/extism/js-pdk | N/A | |
| Python PDK | https://github.com/extism/python-pdk | N/A | |
| Go PDK | https://github.com/extism/go-pdk | Go mod | |
| Haskell PDK | https://github.com/extism/haskell-pdk | Hackage | |
| AssemblyScript PDK | https://github.com/extism/assemblyscript-pdk | NPM | |
| .NET PDK | https://github.com/extism/dotnet-pdk (supports C# & F#!) |
Nuget | |
| C PDK | https://github.com/extism/c-pdk | N/A | |
| C++ PDK | https://github.com/extism/cpp-pdk | N/A | |
| Zig PDK | https://github.com/extism/zig-pdk | N/A |
It's often very useful to define a schema to describe the function signatures and types you want to use between Extism SDK and PDK languages.
XTP Bindgen is an open source framework to generate PDK bindings for Extism plug-ins. It's used by the XTP Platform, but can be used outside of the platform to define any Extism compatible plug-in system.
See installation instructions here.
version: v1-draft
exports:
CountVowels:
input:
type: string
contentType: text/plain; charset=utf-8
output:
$ref: "#/components/schemas/VowelReport"
contentType: application/json
# components.schemas defined in example-schema.yaml...See an example in example-schema.yaml, or a full "kitchen sink" example on the docs page.
xtp plugin init --schema-file ./example-schema.yaml
> 1. TypeScript
2. Go
3. Rust
4. Python
5. C#
6. Zig
7. C++
8. GitHub Template
9. Local Template
This will create an entire boilerplate plugin project for you to get started
with. Implement the empty function(s), and run xtp plugin build to compile
your plugin.
For more information about XTP Bindgen, see the dylibso/xtp-bindgen repository and the official XTP Schema documentation.
If you experience any problems or have any questions, please join our Discord and let us know. Our community is very responsive and happy to help get you started.
Head to the project website for more information and docs. Also, consider reading an overview of Extism and its goals & approach.
Thank you for considering a contribution to Extism, we are happy to help you make a PR or find something to work on!
The easiest way to start would be to join the
Discord or open an issue on the
extism/proposals issue tracker, which
can eventually become an Extism Improvement Proposal (EIP).
For more information, please read the Contributing guide.
Extism is an open-source product from the team at:
Reach out and tell us what you're building! We'd love to help: hello@dylibso.com