Skip to content

Commit

Permalink
feat(go-http): reexport bindings
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Sep 26, 2024
1 parent 4e02f9f commit d45bb62
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion examples/go/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

"github.com/stretchr/testify/assert"
"go.wasmcloud.dev/wadge"
_ "go.wasmcloud.dev/wadge/bindings"
incominghandler "go.wasmcloud.dev/wadge/examples/go/http/bindings/wasi/http/incoming-handler"
"go.wasmcloud.dev/wadge/wadgehttp"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace go.wasmcloud.dev/wadge v0.2.0 => ./.
replace go.wasmcloud.dev/wadge v0.4.1 => ./.
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ go 1.23.0

use ./.

replace go.wasmcloud.dev/wadge v0.2.0 => ./.
replace go.wasmcloud.dev/wadge v0.4.1 => ./.
1 change: 0 additions & 1 deletion tests/go/wasi/wasi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

"github.com/stretchr/testify/assert"
"go.wasmcloud.dev/wadge"
_ "go.wasmcloud.dev/wadge/bindings"
incominghandler "go.wasmcloud.dev/wadge/tests/go/wasi/bindings/wasi/http/incoming-handler"
"go.wasmcloud.dev/wadge/wadgehttp"
)
Expand Down
3 changes: 2 additions & 1 deletion wadgehttp/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"unsafe"

"github.com/bytecodealliance/wasm-tools-go/cm"
_ "go.wasmcloud.dev/wadge/bindings"
"go.wasmcloud.dev/wadge/bindings/wasi/http/types"
"go.wasmcloud.dev/wadge/bindings/wasi/io/poll"
"go.wasmcloud.dev/wadge/bindings/wasiext/http/ext"
Expand Down Expand Up @@ -224,7 +225,7 @@ func NewIncomingResponse(resp types.IncomingResponse) (*http.Response, error) {
bodyStream.ResourceDrop()
futTrailers := types.IncomingBodyFinish(*body)
// TODO: Block for trailers, once panic in wasmtime is fixed
//futTrailers.Subscribe().Block()
// futTrailers.Subscribe().Block()
trailersOptResResOpt := futTrailers.Get()
var trailer http.Header
if trailersOptResRes := trailersOptResResOpt.Some(); trailersOptResRes != nil {
Expand Down

0 comments on commit d45bb62

Please sign in to comment.