Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanburns committed Jul 26, 2023
1 parent 0c0f87c commit 4795e83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bindings/wasm/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func (out *outputBinding) Init(ctx context.Context, metadata bindings.Metadata)
return fmt.Errorf("wasm: error instantiating host wasi functions: %w", err)
}
if _, found := imports[modeWasiHTTP]; found {
if out.meta.StrictSandbox {
return fmt.Errorf("can not instantiate wasi-http with strict sandbox")
}
err = wasi_http.Instantiate(ctx, out.runtime)
}
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions bindings/wasm/testdata/http/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
default: main.wasm

main.wasm: main.go
tinygo build -target wasi -o main.wasm main.go
Binary file modified bindings/wasm/testdata/http/main.wasm
100644 → 100755
Binary file not shown.

0 comments on commit 4795e83

Please sign in to comment.