mirror of
https://github.com/extism/extism.git
synced 2026-01-10 22:37:58 -05:00
The [wasmtime v37 release](https://github.com/bytecodealliance/wasmtime/releases/tag/v37.0.0) "now fully implements the WebAssembly exception-handling proposal." Support for exception-handling is disabled by default, but will be made default in the future (according to the release notes). To use this new wasmtime feature, we do two things at a high level: 1. Update wasmtime dependency to version 37 2. Add a "wasmtime-exceptions" Extism feature, disabled by default. Updating to the new wasmtime dependency required some semantical changes to how the cache is configured. There is also a new `ExternType` to match on when handling invalid imports. My use case for this feature is being able to execute Lua code from Extism. In actuality, I'm running a Rust plugin, which is using [mlua](https://github.com/mlua-rs/mlua) to execute the Lua. I have it working locally with this change. Fwiw, mlua recently added [support to compile to wasi](https://github.com/mlua-rs/mlua/issues/366), which should make this all work end-to-end with no special patches if we can get this merged. This is my first time working on the Extism codebase, so please let me know if I missed anything.
66 lines
1.6 KiB
TOML
66 lines
1.6 KiB
TOML
[package]
|
|
name = "extism"
|
|
description = "Extism runtime and Rust SDK"
|
|
edition.workspace = true
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
homepage.workspace = true
|
|
repository.workspace = true
|
|
version.workspace = true
|
|
|
|
[dependencies]
|
|
wasmtime = { version="37", default-features = false, features = [
|
|
'cache',
|
|
'gc',
|
|
'gc-drc',
|
|
'cranelift',
|
|
'coredump',
|
|
'wat',
|
|
'parallel-compilation',
|
|
'pooling-allocator',
|
|
'demangle',
|
|
] }
|
|
wasi-common = "37"
|
|
wiggle = "37"
|
|
anyhow = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "0.9"
|
|
sha2 = "0.10"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3.18", features = [
|
|
"std",
|
|
"env-filter",
|
|
"fmt",
|
|
] }
|
|
url = "2"
|
|
glob = "0.3"
|
|
ureq = { version = "3.0", optional = true }
|
|
extism-manifest = { workspace = true }
|
|
extism-convert = { workspace = true, features = ["extism-path"] }
|
|
uuid = { version = "1", features = ["v4"] }
|
|
libc = "0.2"
|
|
|
|
[features]
|
|
default = ["http", "register-http", "register-filesystem", "wasmtime-default-features"]
|
|
register-http = ["ureq"] # enables wasm to be downloaded using http
|
|
register-filesystem = [] # enables wasm to be loaded from disk
|
|
http = ["ureq"] # enables extism_http_request
|
|
wasmtime-exceptions = [] # enables exception-handling proposal in wasmtime (requires wasmtime gc feature)
|
|
wasmtime-default-features = [
|
|
'wasmtime/default',
|
|
]
|
|
|
|
|
|
[build-dependencies]
|
|
cbindgen = { version = "0.29", default-features = false }
|
|
|
|
[dev-dependencies]
|
|
criterion = "0.7.0"
|
|
quickcheck = "1"
|
|
rand = "0.9.0"
|
|
|
|
[[bench]]
|
|
name = "bench"
|
|
harness = false
|