containerd-shim-spin currently constructs the underlying Wasmtime engine from spin_core::Config::default() and immediately creates the engine, and there seems no way to override the runtime configuration.
|
async fn compiler() -> Option<SpinCompiler> { |
|
let mut config = spin_core::Config::default(); |
|
Some(SpinCompiler( |
|
wasmtime::Engine::new(config.wasmtime_config()).unwrap(), |
|
)) |
|
} |
https://github.com/spinframework/spin/blob/a794d6e7a514af693f8779c4dfe9f59f391118d0/crates/core/src/lib.rs#L82-L199
This prevents us (scala-wasm/scala-wasm that uses GC, EH, and CM) from running our binary on spin shim.
I'm not very sure how should we design the configuration passing to wasmtime for spin:
There's a same issue in runwasi containerd/runwasi#1004 and I prototyped a feature containerd/runwasi#1105 that shim reads env variable in TOML format and give it to underlying wasmtime. And this way, we can configure wasmtime at the deployment site (not on cluster configuration). But not sure this applies to spin as well.
containerd-shim-spincurrently constructs the underlying Wasmtime engine fromspin_core::Config::default()and immediately creates the engine, and there seems no way to override the runtime configuration.containerd-shim-spin/containerd-shim-spin/src/engine.rs
Lines 63 to 68 in de7f584
https://github.com/spinframework/spin/blob/a794d6e7a514af693f8779c4dfe9f59f391118d0/crates/core/src/lib.rs#L82-L199
This prevents us (scala-wasm/scala-wasm that uses GC, EH, and CM) from running our binary on spin shim.
I'm not very sure how should we design the configuration passing to
wasmtimefor spin:There's a same issue in runwasi containerd/runwasi#1004 and I prototyped a feature containerd/runwasi#1105 that shim reads env variable in TOML format and give it to underlying
wasmtime. And this way, we can configurewasmtimeat the deployment site (not on cluster configuration). But not sure this applies to spin as well.