Skip to content

Commit

Permalink
component should be linked to more functionality than just proxy
Browse files Browse the repository at this point in the history
Signed-off-by: Ava Hahn <[email protected]>
  • Loading branch information
avahahn committed Sep 4, 2024
1 parent b8a8b2b commit 47b1aa6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/wasm-wasi-component/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use wasmtime_wasi::{
DirPerms, FilePerms, WasiCtx, WasiCtxBuilder, WasiView,
};
use wasmtime_wasi_http::bindings::http::types::{ErrorCode, Scheme};
use wasmtime_wasi_http::{WasiHttpCtx, WasiHttpView, add_to_linker_async};
use wasmtime_wasi_http::{WasiHttpCtx, WasiHttpView};
use wasmtime_wasi_http::bindings::ProxyPre;

#[allow(
Expand Down Expand Up @@ -210,10 +210,10 @@ impl GlobalState {
let component = Component::from_file(&engine, &global_config.component)
.context("failed to compile component")?;
let mut linker = Linker::<StoreState>::new(&engine);
add_to_linker_async(&mut linker)
.context("failed to add to linker")?;
//add_only_http_to_linker_sync(&mut linker)
// .context("failed to add http to linker")?;
wasmtime_wasi::add_to_linker_async(&mut linker)
.context("failed to add wasi to linker")?;
wasmtime_wasi_http::add_only_http_to_linker_sync(&mut linker)
.context("failed to add wasi:http to linker")?;
let component = linker
.instantiate_pre(&component)
.context("failed to pre-instantiate the provided component")?;
Expand Down

0 comments on commit 47b1aa6

Please sign in to comment.