Skip to content

Commit bfe7729

Browse files
committed
Wasm-wc: Allow to use the 'reactor' adaptor again
With the initial port to wasmtime 17 we could no longer use the 'reactor' adaptor but had to switch to the more restrictive 'proxy' adaptor. This meant amongst other things (probably) we could no longer access the filesystem. Thanks to Joel Dice for pointing out the fix. With this we can go back to using the 'reactor' adaptor again and things are back to working as before. It's worth noting that you can use either the 'proxy' or 'reactor' adaptor depending on your requirements. Cc: Joel Dice <[email protected]> Signed-off-by: Andrew Clayton <[email protected]>
1 parent df7a530 commit bfe7729

File tree

1 file changed

+2
-1
lines changed
  • src/wasm-wasi-component/src

1 file changed

+2
-1
lines changed

src/wasm-wasi-component/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ impl GlobalState {
200200
let component = Component::from_file(&engine, &global_config.component)
201201
.context("failed to compile component")?;
202202
let mut linker = Linker::<StoreState>::new(&engine);
203-
wasmtime_wasi_http::proxy::add_to_linker(&mut linker)?;
203+
wasmtime_wasi::preview2::command::add_to_linker(&mut linker)?;
204+
wasmtime_wasi_http::proxy::add_only_http_to_linker(&mut linker)?;
204205
let component = linker
205206
.instantiate_pre(&component)
206207
.context("failed to pre-instantiate the provided component")?;

0 commit comments

Comments
 (0)