Skip to content

Commit

Permalink
Wasm-wc: Allow to use the 'reactor' adaptor again
Browse files Browse the repository at this point in the history
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.

Cc: Joel Dice <[email protected]>
Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
ac000 committed Feb 13, 2024
1 parent df7a530 commit f35cf09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wasm-wasi-component/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ impl GlobalState {
let component = Component::from_file(&engine, &global_config.component)
.context("failed to compile component")?;
let mut linker = Linker::<StoreState>::new(&engine);
wasmtime_wasi_http::proxy::add_to_linker(&mut linker)?;
wasmtime_wasi::preview2::command::add_to_linker(&mut linker)?;
wasmtime_wasi_http::proxy::add_only_http_to_linker(&mut linker)?;
let component = linker
.instantiate_pre(&component)
.context("failed to pre-instantiate the provided component")?;
Expand Down

0 comments on commit f35cf09

Please sign in to comment.