diff --git a/wit/async/async.go b/wit/async/async.go index 710fd37..8bda86a 100644 --- a/wit/async/async.go +++ b/wit/async/async.go @@ -218,22 +218,29 @@ func Yield() { } //go:wasmimport $root [waitable-set-new] +//go:noescape func waitableSetNew() uint32 //go:wasmimport $root [waitable-set-poll] +//go:noescape func waitableSetPoll(waitableSet uint32, eventPayload unsafe.Pointer) uint32 //go:wasmimport $root [waitable-set-drop] +//go:noescape func waitableSetDrop(waitableSet uint32) //go:wasmimport $root [waitable-join] +//go:noescape func waitableJoin(waitable, waitableSet uint32) //go:wasmimport $root [context-get-0] +//go:noescape func contextGet() unsafe.Pointer //go:wasmimport $root [context-set-0] +//go:noescape func contextSet(value unsafe.Pointer) //go:wasmimport $root [subtask-drop] +//go:noescape func subtaskDrop(subtask uint32) diff --git a/wit/async/empty.s b/wit/async/empty.s new file mode 100644 index 0000000..5444f20 --- /dev/null +++ b/wit/async/empty.s @@ -0,0 +1,3 @@ +// This file exists for testing this package without WebAssembly, +// allowing empty function bodies with a //go:wasmimport directive. +// See https://pkg.go.dev/cmd/compile for more information.