diff --git a/.github/workflows/west.yml b/.github/workflows/wadge.yml similarity index 90% rename from .github/workflows/west.yml rename to .github/workflows/wadge.yml index 45d31d0..dd0efcc 100644 --- a/.github/workflows/west.yml +++ b/.github/workflows/wadge.yml @@ -1,4 +1,4 @@ -name: west +name: wadge on: merge_group: @@ -33,7 +33,7 @@ jobs: #- aarch64-apple-darwin #- x86_64-apple-darwin - name: west-${{ matrix.target }} + name: wadge-${{ matrix.target }} runs-on: ubuntu-latest steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -42,7 +42,7 @@ jobs: cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - uses: ./.github/actions/build-nix with: - package: west-${{ matrix.target }} + package: wadge-${{ matrix.target }} build-ffi-darwin: strategy: @@ -56,20 +56,20 @@ jobs: target: aarch64-apple-darwin sdk: 11.0 - name: west-${{ matrix.config.target }} + name: wadge-${{ matrix.config.target }} runs-on: ${{ matrix.config.os }} steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - run: rustup show - uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 - - run: cargo build -p west-sys --release --target ${{ matrix.config.target }} + - run: cargo build -p wadge-sys --release --target ${{ matrix.config.target }} env: MACOSX_DEPLOYMENT_TARGET: ${{ matrix.config.sdk }} - run: mkdir -p artifact/lib - - run: mv target/${{ matrix.config.target }}/release/libwest_sys.a artifact/lib/libwest_sys.a + - run: mv target/${{ matrix.config.target }}/release/libwadge_sys.a artifact/lib/libwadge_sys.a - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: - name: west-${{ matrix.config.target }} + name: wadge-${{ matrix.config.target }} path: artifact build-wasm: @@ -81,8 +81,8 @@ jobs: with: cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: nix profile install --inputs-from . '.#rust' 'nixpkgs#wasm-tools' - - run: cargo build -p west-passthrough --target wasm32-unknown-unknown --release - - run: wasm-tools component new target/wasm32-unknown-unknown/release/west_passthrough.wasm -o lib/passthrough.wasm + - run: cargo build -p wadge-passthrough --target wasm32-unknown-unknown --release + - run: wasm-tools component new target/wasm32-unknown-unknown/release/wadge_passthrough.wasm -o lib/passthrough.wasm - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: passthrough @@ -139,8 +139,8 @@ jobs: path: lib - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: west-${{ matrix.config.target }} - - run: mv lib/libwest_sys.a "lib/${{ matrix.config.lib }}/libwest.a" + name: wadge-${{ matrix.config.target }} + - run: mv lib/libwadge_sys.a "lib/${{ matrix.config.lib }}/libwadge.a" - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -151,7 +151,7 @@ jobs: - run: go test -failfast ./... env: GOGC: 1 - WEST_LOG: trace + WADGE_LOG: trace - run: git diff --exit-code test-dev: @@ -202,7 +202,7 @@ jobs: - run: go test -failfast -tags=dev ./... env: GOGC: 1 - WEST_LOG: trace + WADGE_LOG: trace - run: git diff --exit-code gofmt: @@ -300,9 +300,9 @@ jobs: cat < doc/index.html - Redirecting to west/index.html - - + Redirecting to wadge/index.html + + EOF - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 with: @@ -345,7 +345,7 @@ jobs: echo "prerelease=true" >> "$GITHUB_OUTPUT" fi - - name: publish west to crates.io + - name: publish wadge to crates.io run: | pkgver=$(cargo pkgid | cut -d '@' -f 2) tagver="${{ steps.ctx.outputs.version }}" @@ -360,10 +360,10 @@ jobs: path: artifacts - run: | - mkdir -p ./libwest - for dir in ./artifacts/west-*; do - target=${dir#./artifacts/west-} - mv ${dir}/lib/libwest_sys.a ./libwest/libwest-${target}.a + mkdir -p ./libwadge + for dir in ./artifacts/wadge-*; do + target=${dir#./artifacts/wadge-} + mv ${dir}/lib/libwadge_sys.a ./libwadge/libwadge-${target}.a done - uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 @@ -372,5 +372,5 @@ jobs: prerelease: true generate_release_notes: true files: | - ./libwest/* + ./libwadge/* diff --git a/.gitignore b/.gitignore index 0f5250b..d1635e1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ *.wasm *.a *.lib -west_bindings_test.go +wadge_bindings_test.go /go/internal/tests/*/bindings/* diff --git a/Cargo.lock b/Cargo.lock index 21d22f5..4c0214c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1650,6 +1650,47 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "wadge" +version = "0.3.0" +dependencies = [ + "anyhow", + "http", + "tokio", + "tracing", + "wasi-preview1-component-adapter-provider", + "wasmparser", + "wasmtime", + "wasmtime-wasi", + "wasmtime-wasi-http", + "wasmtime-wasi-keyvalue", + "wasmtime-wasi-runtime-config", + "wit-component", +] + +[[package]] +name = "wadge-passthrough" +version = "0.2.0" +dependencies = [ + "wasi-passthrough", + "wasi-passthrough-ext", + "wasi-passthrough-logging", + "wit-bindgen", +] + +[[package]] +name = "wadge-sys" +version = "0.3.0" +dependencies = [ + "anyhow", + "tracing", + "tracing-subscriber", + "wadge", + "wasmtime", + "wasmtime-cabish", + "wasmtime-wasi", +] + [[package]] name = "want" version = "0.3.1" @@ -2151,47 +2192,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "west" -version = "0.2.1" -dependencies = [ - "anyhow", - "http", - "tokio", - "tracing", - "wasi-preview1-component-adapter-provider", - "wasmparser", - "wasmtime", - "wasmtime-wasi", - "wasmtime-wasi-http", - "wasmtime-wasi-keyvalue", - "wasmtime-wasi-runtime-config", - "wit-component", -] - -[[package]] -name = "west-passthrough" -version = "0.2.0" -dependencies = [ - "wasi-passthrough", - "wasi-passthrough-ext", - "wasi-passthrough-logging", - "wit-bindgen", -] - -[[package]] -name = "west-sys" -version = "0.2.0" -dependencies = [ - "anyhow", - "tracing", - "tracing-subscriber", - "wasmtime", - "wasmtime-cabish", - "wasmtime-wasi", - "west", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 072b6f5..9862693 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "west" -version = "0.2.1" -description = "WebAssembly component test runtime" +name = "wadge" +version = "0.3.0" +description = "WAdge runtime" authors.workspace = true categories.workspace = true @@ -32,15 +32,15 @@ members = ["crates/*", "tests/components/*"] authors = ["Roman Volosatovs "] categories = ["wasm"] edition = "2021" -homepage = "https://github.com/wasmCloud/west" +homepage = "https://github.com/wasmCloud/wadge" license = "Apache-2.0 WITH LLVM-exception" -repository = "https://github.com/wasmCloud/west" +repository = "https://github.com/wasmCloud/wadge" -[profile.release.package.west-passthrough] +[profile.release.package.wadge-passthrough] opt-level = 's' strip = true -[profile.release.package.west-sys] +[profile.release.package.wadge-sys] opt-level = 's' strip = true @@ -78,6 +78,7 @@ http = { version = "1", default-features = false } tokio = { version = "1", default-features = false } tracing = { version = "0.1", default-features = false } tracing-subscriber = { version = "0.3", default-features = false } +wadge = { version = "0.3", path = "." } wasi-passthrough = { version = "0.3.2", default-features = false } wasi-passthrough-ext = { version = "0.1.4", default-features = false } wasi-passthrough-keyvalue = { version = "0.1.1", default-features = false } @@ -90,6 +91,5 @@ wasmtime-wasi = { version = "25", default-features = false } wasmtime-wasi-http = { version = "25", default-features = false } wasmtime-wasi-keyvalue = { version = "25", default-features = false } wasmtime-wasi-runtime-config = { version = "25", default-features = false } -west = { version = "0.2", path = "." } wit-bindgen = { version = "0.32", default-features = false } wit-component = { version = "0.217", default-features = false } diff --git a/README.md b/README.md index f68f645..e4a30cb 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Description -`west` is a testing framework, which lets you test your WebAssembly applications natively and using all your existing development tools (e.g. debuggers). +`wadge` is a testing framework, which lets you test your WebAssembly applications natively and using all your existing development tools (e.g. debuggers). ## Go -`west` provides `west-bindgen-go` utility, which walks the complete AST of your application and generates a binding file, which replaces functions with `wasmimport` directives, normally provided by the runtime, by a native implementation, which invokes those imports on a WebAssembly component (harness) running in an embedded Wasmtime instance. This lets you test you applications without changing implementation and achieving full test coverage. +`wadge` provides `wadge-bindgen-go` utility, which walks the complete AST of your application and generates a binding file, which replaces functions with `wasmimport` directives, normally provided by the runtime, by a native implementation, which invokes those imports on a WebAssembly component (harness) running in an embedded Wasmtime instance. This lets you test you applications without changing implementation and achieving full test coverage. # Design -`west` uses [`cabish`](https://github.com/wasmCloud/cabish) to read and write values over FFI to pass to embedded Wasmtime instance. +`wadge` uses [`cabish`](https://github.com/wasmCloud/cabish) to read and write values over FFI to pass to embedded Wasmtime instance. diff --git a/bindings/bindings.go b/bindings/bindings.go index 4c48afb..b0b99d5 100644 --- a/bindings/bindings.go +++ b/bindings/bindings.go @@ -1,14 +1,14 @@ -// Code generated by west-bindgen-go DO NOT EDIT +// Code generated by wadge-bindgen-go DO NOT EDIT package bindings import ( github_com__bytecodealliance__wasm___tools___go__cm "github.com/bytecodealliance/wasm-tools-go/cm" - west "github.com/wasmCloud/west" - github_com__wasmCloud__west__bindings__wasi__clocks__monotonic___clock "github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock" - github_com__wasmCloud__west__bindings__wasi__http__types "github.com/wasmCloud/west/bindings/wasi/http/types" - github_com__wasmCloud__west__bindings__wasi__io__poll "github.com/wasmCloud/west/bindings/wasi/io/poll" - github_com__wasmCloud__west__bindings__wasi__io__streams "github.com/wasmCloud/west/bindings/wasi/io/streams" + wadge "github.com/wasmCloud/wadge" + github_com__wasmCloud__wadge__bindings__wasi__clocks__monotonic___clock "github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock" + github_com__wasmCloud__wadge__bindings__wasi__http__types "github.com/wasmCloud/wadge/bindings/wasi/http/types" + github_com__wasmCloud__wadge__bindings__wasi__io__poll "github.com/wasmCloud/wadge/bindings/wasi/io/poll" + github_com__wasmCloud__wadge__bindings__wasi__io__streams "github.com/wasmCloud/wadge/bindings/wasi/io/streams" "runtime" "unsafe" ) @@ -17,43 +17,43 @@ const _ string = runtime.Compiler var _ unsafe.Pointer -//go:linkname wasmimport_Now github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock.wasmimport_Now +//go:linkname wasmimport_Now github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock.wasmimport_Now func wasmimport_Now() (result0 uint64) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "now", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_Resolution github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock.wasmimport_Resolution +//go:linkname wasmimport_Resolution github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock.wasmimport_Resolution func wasmimport_Resolution() (result0 uint64) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "resolution", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_SubscribeDuration github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeDuration +//go:linkname wasmimport_SubscribeDuration github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeDuration func wasmimport_SubscribeDuration(when0 uint64) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "subscribe-duration", func() unsafe.Pointer { ptr := unsafe.Pointer(&when0) __p.Pin(ptr) @@ -64,16 +64,16 @@ func wasmimport_SubscribeDuration(when0 uint64) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_SubscribeInstant github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeInstant +//go:linkname wasmimport_SubscribeInstant github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeInstant func wasmimport_SubscribeInstant(when0 uint64) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "subscribe-instant", func() unsafe.Pointer { ptr := unsafe.Pointer(&when0) __p.Pin(ptr) @@ -84,32 +84,32 @@ func wasmimport_SubscribeInstant(when0 uint64) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_NewFields github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_NewFields +//go:linkname wasmimport_NewFields github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_NewFields func wasmimport_NewFields() (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[constructor]fields", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_NewOutgoingRequest github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_NewOutgoingRequest +//go:linkname wasmimport_NewOutgoingRequest github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_NewOutgoingRequest func wasmimport_NewOutgoingRequest(headers0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[constructor]outgoing-request", func() unsafe.Pointer { ptr := unsafe.Pointer(&headers0) __p.Pin(ptr) @@ -120,16 +120,16 @@ func wasmimport_NewOutgoingRequest(headers0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_NewOutgoingResponse github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_NewOutgoingResponse +//go:linkname wasmimport_NewOutgoingResponse github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_NewOutgoingResponse func wasmimport_NewOutgoingResponse(headers0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[constructor]outgoing-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&headers0) __p.Pin(ptr) @@ -140,32 +140,32 @@ func wasmimport_NewOutgoingResponse(headers0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_NewRequestOptions github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_NewRequestOptions +//go:linkname wasmimport_NewRequestOptions github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_NewRequestOptions func wasmimport_NewRequestOptions() (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[constructor]request-options", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsAppend github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsAppend -func wasmimport_FieldsAppend(self0 uint32, name0 *uint8, name1 uint32, value0 *uint8, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__west__bindings__wasi__http__types.HeaderError]) { +//go:linkname wasmimport_FieldsAppend github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsAppend +func wasmimport_FieldsAppend(self0 uint32, name0 *uint8, name1 uint32, value0 *uint8, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__http__types.HeaderError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]fields.append", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -192,16 +192,16 @@ func wasmimport_FieldsAppend(self0 uint32, name0 *uint8, name1 uint32, value0 *u return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsClone github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsClone +//go:linkname wasmimport_FieldsClone github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsClone func wasmimport_FieldsClone(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]fields.clone", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -212,16 +212,16 @@ func wasmimport_FieldsClone(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsDelete github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsDelete -func wasmimport_FieldsDelete(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__west__bindings__wasi__http__types.HeaderError]) { +//go:linkname wasmimport_FieldsDelete github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsDelete +func wasmimport_FieldsDelete(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__http__types.HeaderError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]fields.delete", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -240,16 +240,16 @@ func wasmimport_FieldsDelete(self0 uint32, name0 *uint8, name1 uint32, result *g return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsEntries github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsEntries -func wasmimport_FieldsEntries(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__west__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__west__bindings__wasi__http__types.FieldValue]]) { +//go:linkname wasmimport_FieldsEntries github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsEntries +func wasmimport_FieldsEntries(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__wadge__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__wadge__bindings__wasi__http__types.FieldValue]]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]fields.entries", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -260,16 +260,16 @@ func wasmimport_FieldsEntries(self0 uint32, result *github_com__bytecodealliance return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsGet github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsGet -func wasmimport_FieldsGet(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__west__bindings__wasi__http__types.FieldValue]) { +//go:linkname wasmimport_FieldsGet github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsGet +func wasmimport_FieldsGet(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__bindings__wasi__http__types.FieldValue]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]fields.get", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -288,16 +288,16 @@ func wasmimport_FieldsGet(self0 uint32, name0 *uint8, name1 uint32, result *gith return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsHas github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsHas +//go:linkname wasmimport_FieldsHas github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsHas func wasmimport_FieldsHas(self0 uint32, name0 *uint8, name1 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]fields.has", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -316,16 +316,16 @@ func wasmimport_FieldsHas(self0 uint32, name0 *uint8, name1 uint32) (result0 uin return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsSet github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsSet -func wasmimport_FieldsSet(self0 uint32, name0 *uint8, name1 uint32, value0 *github_com__wasmCloud__west__bindings__wasi__http__types.FieldValue, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__west__bindings__wasi__http__types.HeaderError]) { +//go:linkname wasmimport_FieldsSet github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsSet +func wasmimport_FieldsSet(self0 uint32, name0 *uint8, name1 uint32, value0 *github_com__wasmCloud__wadge__bindings__wasi__http__types.FieldValue, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__http__types.HeaderError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]fields.set", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -352,16 +352,16 @@ func wasmimport_FieldsSet(self0 uint32, name0 *uint8, name1 uint32, value0 *gith return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FutureIncomingResponseGet github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FutureIncomingResponseGet -func wasmimport_FutureIncomingResponseGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__west__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__west__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCode], struct{}]]) { +//go:linkname wasmimport_FutureIncomingResponseGet github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FutureIncomingResponseGet +func wasmimport_FutureIncomingResponseGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__wadge__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__wadge__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCode], struct{}]]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]future-incoming-response.get", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -372,16 +372,16 @@ func wasmimport_FutureIncomingResponseGet(self0 uint32, result *github_com__byte return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FutureIncomingResponseSubscribe github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FutureIncomingResponseSubscribe +//go:linkname wasmimport_FutureIncomingResponseSubscribe github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FutureIncomingResponseSubscribe func wasmimport_FutureIncomingResponseSubscribe(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]future-incoming-response.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -392,16 +392,16 @@ func wasmimport_FutureIncomingResponseSubscribe(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FutureTrailersGet github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FutureTrailersGet -func wasmimport_FutureTrailersGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__http__types.Fields], github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__http__types.Fields], github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCode], struct{}]]) { +//go:linkname wasmimport_FutureTrailersGet github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FutureTrailersGet +func wasmimport_FutureTrailersGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__http__types.Fields], github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__http__types.Fields], github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCode], struct{}]]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]future-trailers.get", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -412,16 +412,16 @@ func wasmimport_FutureTrailersGet(self0 uint32, result *github_com__bytecodealli return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FutureTrailersSubscribe github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FutureTrailersSubscribe +//go:linkname wasmimport_FutureTrailersSubscribe github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FutureTrailersSubscribe func wasmimport_FutureTrailersSubscribe(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]future-trailers.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -432,16 +432,16 @@ func wasmimport_FutureTrailersSubscribe(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingBodyStream github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingBodyStream -func wasmimport_IncomingBodyStream(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.InputStream, github_com__wasmCloud__west__bindings__wasi__io__streams.InputStream, struct{}]) { +//go:linkname wasmimport_IncomingBodyStream github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingBodyStream +func wasmimport_IncomingBodyStream(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.InputStream, github_com__wasmCloud__wadge__bindings__wasi__io__streams.InputStream, struct{}]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-body.stream", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -452,16 +452,16 @@ func wasmimport_IncomingBodyStream(self0 uint32, result *github_com__bytecodeall return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingRequestAuthority github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingRequestAuthority +//go:linkname wasmimport_IncomingRequestAuthority github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingRequestAuthority func wasmimport_IncomingRequestAuthority(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.authority", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -472,16 +472,16 @@ func wasmimport_IncomingRequestAuthority(self0 uint32, result *github_com__bytec return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingRequestConsume github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingRequestConsume -func wasmimport_IncomingRequestConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__west__bindings__wasi__http__types.IncomingBody, struct{}]) { +//go:linkname wasmimport_IncomingRequestConsume github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingRequestConsume +func wasmimport_IncomingRequestConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__wadge__bindings__wasi__http__types.IncomingBody, struct{}]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.consume", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -492,16 +492,16 @@ func wasmimport_IncomingRequestConsume(self0 uint32, result *github_com__bytecod return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingRequestHeaders github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingRequestHeaders +//go:linkname wasmimport_IncomingRequestHeaders github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingRequestHeaders func wasmimport_IncomingRequestHeaders(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -512,16 +512,16 @@ func wasmimport_IncomingRequestHeaders(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingRequestMethod github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingRequestMethod -func wasmimport_IncomingRequestMethod(self0 uint32, result *github_com__wasmCloud__west__bindings__wasi__http__types.Method) { +//go:linkname wasmimport_IncomingRequestMethod github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingRequestMethod +func wasmimport_IncomingRequestMethod(self0 uint32, result *github_com__wasmCloud__wadge__bindings__wasi__http__types.Method) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.method", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -532,16 +532,16 @@ func wasmimport_IncomingRequestMethod(self0 uint32, result *github_com__wasmClou return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingRequestPathWithQuery github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingRequestPathWithQuery +//go:linkname wasmimport_IncomingRequestPathWithQuery github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingRequestPathWithQuery func wasmimport_IncomingRequestPathWithQuery(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.path-with-query", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -552,16 +552,16 @@ func wasmimport_IncomingRequestPathWithQuery(self0 uint32, result *github_com__b return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingRequestScheme github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingRequestScheme -func wasmimport_IncomingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__http__types.Scheme]) { +//go:linkname wasmimport_IncomingRequestScheme github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingRequestScheme +func wasmimport_IncomingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__http__types.Scheme]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.scheme", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -572,16 +572,16 @@ func wasmimport_IncomingRequestScheme(self0 uint32, result *github_com__bytecode return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingResponseConsume github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingResponseConsume -func wasmimport_IncomingResponseConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__west__bindings__wasi__http__types.IncomingBody, struct{}]) { +//go:linkname wasmimport_IncomingResponseConsume github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingResponseConsume +func wasmimport_IncomingResponseConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__wadge__bindings__wasi__http__types.IncomingBody, struct{}]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.consume", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -592,16 +592,16 @@ func wasmimport_IncomingResponseConsume(self0 uint32, result *github_com__byteco return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingResponseHeaders github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingResponseHeaders +//go:linkname wasmimport_IncomingResponseHeaders github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingResponseHeaders func wasmimport_IncomingResponseHeaders(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -612,16 +612,16 @@ func wasmimport_IncomingResponseHeaders(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingResponseStatus github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingResponseStatus +//go:linkname wasmimport_IncomingResponseStatus github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingResponseStatus func wasmimport_IncomingResponseStatus(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.status", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -632,16 +632,16 @@ func wasmimport_IncomingResponseStatus(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingBodyWrite github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingBodyWrite -func wasmimport_OutgoingBodyWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.OutputStream, github_com__wasmCloud__west__bindings__wasi__io__streams.OutputStream, struct{}]) { +//go:linkname wasmimport_OutgoingBodyWrite github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingBodyWrite +func wasmimport_OutgoingBodyWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.OutputStream, github_com__wasmCloud__wadge__bindings__wasi__io__streams.OutputStream, struct{}]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-body.write", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -652,16 +652,16 @@ func wasmimport_OutgoingBodyWrite(self0 uint32, result *github_com__bytecodealli return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestAuthority github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestAuthority +//go:linkname wasmimport_OutgoingRequestAuthority github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestAuthority func wasmimport_OutgoingRequestAuthority(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.authority", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -672,16 +672,16 @@ func wasmimport_OutgoingRequestAuthority(self0 uint32, result *github_com__bytec return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestBody github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestBody -func wasmimport_OutgoingRequestBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__west__bindings__wasi__http__types.OutgoingBody, struct{}]) { +//go:linkname wasmimport_OutgoingRequestBody github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestBody +func wasmimport_OutgoingRequestBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__wadge__bindings__wasi__http__types.OutgoingBody, struct{}]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -692,16 +692,16 @@ func wasmimport_OutgoingRequestBody(self0 uint32, result *github_com__bytecodeal return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestHeaders github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestHeaders +//go:linkname wasmimport_OutgoingRequestHeaders github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestHeaders func wasmimport_OutgoingRequestHeaders(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -712,16 +712,16 @@ func wasmimport_OutgoingRequestHeaders(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestMethod github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestMethod -func wasmimport_OutgoingRequestMethod(self0 uint32, result *github_com__wasmCloud__west__bindings__wasi__http__types.Method) { +//go:linkname wasmimport_OutgoingRequestMethod github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestMethod +func wasmimport_OutgoingRequestMethod(self0 uint32, result *github_com__wasmCloud__wadge__bindings__wasi__http__types.Method) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.method", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -732,16 +732,16 @@ func wasmimport_OutgoingRequestMethod(self0 uint32, result *github_com__wasmClou return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestPathWithQuery github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestPathWithQuery +//go:linkname wasmimport_OutgoingRequestPathWithQuery github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestPathWithQuery func wasmimport_OutgoingRequestPathWithQuery(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.path-with-query", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -752,16 +752,16 @@ func wasmimport_OutgoingRequestPathWithQuery(self0 uint32, result *github_com__b return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestScheme github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestScheme -func wasmimport_OutgoingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__http__types.Scheme]) { +//go:linkname wasmimport_OutgoingRequestScheme github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestScheme +func wasmimport_OutgoingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__http__types.Scheme]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.scheme", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -772,16 +772,16 @@ func wasmimport_OutgoingRequestScheme(self0 uint32, result *github_com__bytecode return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestSetAuthority github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestSetAuthority +//go:linkname wasmimport_OutgoingRequestSetAuthority github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestSetAuthority func wasmimport_OutgoingRequestSetAuthority(self0 uint32, authority0 uint32, authority1 *uint8, authority2 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-authority", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -804,16 +804,16 @@ func wasmimport_OutgoingRequestSetAuthority(self0 uint32, authority0 uint32, aut return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestSetMethod github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestSetMethod +//go:linkname wasmimport_OutgoingRequestSetMethod github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestSetMethod func wasmimport_OutgoingRequestSetMethod(self0 uint32, method0 uint32, method1 *uint8, method2 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-method", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -836,16 +836,16 @@ func wasmimport_OutgoingRequestSetMethod(self0 uint32, method0 uint32, method1 * return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestSetPathWithQuery github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestSetPathWithQuery +//go:linkname wasmimport_OutgoingRequestSetPathWithQuery github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestSetPathWithQuery func wasmimport_OutgoingRequestSetPathWithQuery(self0 uint32, pathWithQuery0 uint32, pathWithQuery1 *uint8, pathWithQuery2 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-path-with-query", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -868,16 +868,16 @@ func wasmimport_OutgoingRequestSetPathWithQuery(self0 uint32, pathWithQuery0 uin return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestSetScheme github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestSetScheme +//go:linkname wasmimport_OutgoingRequestSetScheme github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestSetScheme func wasmimport_OutgoingRequestSetScheme(self0 uint32, scheme0 uint32, scheme1 uint32, scheme2 *uint8, scheme3 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-scheme", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -904,16 +904,16 @@ func wasmimport_OutgoingRequestSetScheme(self0 uint32, scheme0 uint32, scheme1 u return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingResponseBody github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingResponseBody -func wasmimport_OutgoingResponseBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__west__bindings__wasi__http__types.OutgoingBody, struct{}]) { +//go:linkname wasmimport_OutgoingResponseBody github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingResponseBody +func wasmimport_OutgoingResponseBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__wadge__bindings__wasi__http__types.OutgoingBody, struct{}]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -924,16 +924,16 @@ func wasmimport_OutgoingResponseBody(self0 uint32, result *github_com__bytecodea return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingResponseHeaders github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingResponseHeaders +//go:linkname wasmimport_OutgoingResponseHeaders github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingResponseHeaders func wasmimport_OutgoingResponseHeaders(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -944,16 +944,16 @@ func wasmimport_OutgoingResponseHeaders(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingResponseSetStatusCode github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingResponseSetStatusCode +//go:linkname wasmimport_OutgoingResponseSetStatusCode github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingResponseSetStatusCode func wasmimport_OutgoingResponseSetStatusCode(self0 uint32, statusCode0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.set-status-code", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -968,16 +968,16 @@ func wasmimport_OutgoingResponseSetStatusCode(self0 uint32, statusCode0 uint32) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingResponseStatusCode github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingResponseStatusCode +//go:linkname wasmimport_OutgoingResponseStatusCode github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingResponseStatusCode func wasmimport_OutgoingResponseStatusCode(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.status-code", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -988,16 +988,16 @@ func wasmimport_OutgoingResponseStatusCode(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_RequestOptionsBetweenBytesTimeout github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_RequestOptionsBetweenBytesTimeout -func wasmimport_RequestOptionsBetweenBytesTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__clocks__monotonic___clock.Duration]) { +//go:linkname wasmimport_RequestOptionsBetweenBytesTimeout github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_RequestOptionsBetweenBytesTimeout +func wasmimport_RequestOptionsBetweenBytesTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__clocks__monotonic___clock.Duration]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.between-bytes-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1008,16 +1008,16 @@ func wasmimport_RequestOptionsBetweenBytesTimeout(self0 uint32, result *github_c return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_RequestOptionsConnectTimeout github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_RequestOptionsConnectTimeout -func wasmimport_RequestOptionsConnectTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__clocks__monotonic___clock.Duration]) { +//go:linkname wasmimport_RequestOptionsConnectTimeout github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_RequestOptionsConnectTimeout +func wasmimport_RequestOptionsConnectTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__clocks__monotonic___clock.Duration]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.connect-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1028,16 +1028,16 @@ func wasmimport_RequestOptionsConnectTimeout(self0 uint32, result *github_com__b return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_RequestOptionsFirstByteTimeout github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_RequestOptionsFirstByteTimeout -func wasmimport_RequestOptionsFirstByteTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__clocks__monotonic___clock.Duration]) { +//go:linkname wasmimport_RequestOptionsFirstByteTimeout github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_RequestOptionsFirstByteTimeout +func wasmimport_RequestOptionsFirstByteTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__clocks__monotonic___clock.Duration]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.first-byte-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1048,16 +1048,16 @@ func wasmimport_RequestOptionsFirstByteTimeout(self0 uint32, result *github_com_ return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_RequestOptionsSetBetweenBytesTimeout github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_RequestOptionsSetBetweenBytesTimeout +//go:linkname wasmimport_RequestOptionsSetBetweenBytesTimeout github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_RequestOptionsSetBetweenBytesTimeout func wasmimport_RequestOptionsSetBetweenBytesTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-between-bytes-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1076,16 +1076,16 @@ func wasmimport_RequestOptionsSetBetweenBytesTimeout(self0 uint32, duration0 uin return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_RequestOptionsSetConnectTimeout github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_RequestOptionsSetConnectTimeout +//go:linkname wasmimport_RequestOptionsSetConnectTimeout github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_RequestOptionsSetConnectTimeout func wasmimport_RequestOptionsSetConnectTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-connect-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1104,16 +1104,16 @@ func wasmimport_RequestOptionsSetConnectTimeout(self0 uint32, duration0 uint32, return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_RequestOptionsSetFirstByteTimeout github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_RequestOptionsSetFirstByteTimeout +//go:linkname wasmimport_RequestOptionsSetFirstByteTimeout github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_RequestOptionsSetFirstByteTimeout func wasmimport_RequestOptionsSetFirstByteTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-first-byte-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1132,192 +1132,192 @@ func wasmimport_RequestOptionsSetFirstByteTimeout(self0 uint32, duration0 uint32 return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsResourceDrop +//go:linkname wasmimport_FieldsResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsResourceDrop func wasmimport_FieldsResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]fields", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FutureIncomingResponseResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FutureIncomingResponseResourceDrop +//go:linkname wasmimport_FutureIncomingResponseResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FutureIncomingResponseResourceDrop func wasmimport_FutureIncomingResponseResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]future-incoming-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FutureTrailersResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FutureTrailersResourceDrop +//go:linkname wasmimport_FutureTrailersResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FutureTrailersResourceDrop func wasmimport_FutureTrailersResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]future-trailers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingBodyResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingBodyResourceDrop +//go:linkname wasmimport_IncomingBodyResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingBodyResourceDrop func wasmimport_IncomingBodyResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingRequestResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingRequestResourceDrop +//go:linkname wasmimport_IncomingRequestResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingRequestResourceDrop func wasmimport_IncomingRequestResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-request", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingResponseResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingResponseResourceDrop +//go:linkname wasmimport_IncomingResponseResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingResponseResourceDrop func wasmimport_IncomingResponseResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingBodyResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingBodyResourceDrop +//go:linkname wasmimport_OutgoingBodyResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingBodyResourceDrop func wasmimport_OutgoingBodyResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingRequestResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingRequestResourceDrop +//go:linkname wasmimport_OutgoingRequestResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingRequestResourceDrop func wasmimport_OutgoingRequestResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-request", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingResponseResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingResponseResourceDrop +//go:linkname wasmimport_OutgoingResponseResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingResponseResourceDrop func wasmimport_OutgoingResponseResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_RequestOptionsResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_RequestOptionsResourceDrop +//go:linkname wasmimport_RequestOptionsResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_RequestOptionsResourceDrop func wasmimport_RequestOptionsResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]request-options", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_ResponseOutparamResourceDrop github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_ResponseOutparamResourceDrop +//go:linkname wasmimport_ResponseOutparamResourceDrop github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_ResponseOutparamResourceDrop func wasmimport_ResponseOutparamResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]response-outparam", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_FieldsFromList github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_FieldsFromList -func wasmimport_FieldsFromList(entries0 *github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__west__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__west__bindings__wasi__http__types.FieldValue], entries1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.Fields, github_com__wasmCloud__west__bindings__wasi__http__types.Fields, github_com__wasmCloud__west__bindings__wasi__http__types.HeaderError]) { +//go:linkname wasmimport_FieldsFromList github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_FieldsFromList +func wasmimport_FieldsFromList(entries0 *github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__wadge__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__wadge__bindings__wasi__http__types.FieldValue], entries1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.Fields, github_com__wasmCloud__wadge__bindings__wasi__http__types.Fields, github_com__wasmCloud__wadge__bindings__wasi__http__types.HeaderError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[static]fields.from-list", func() unsafe.Pointer { ptr := unsafe.Pointer(entries0) __p.Pin(ptr) @@ -1332,16 +1332,16 @@ func wasmimport_FieldsFromList(entries0 *github_com__bytecodealliance__wasm___to return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_IncomingBodyFinish github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_IncomingBodyFinish +//go:linkname wasmimport_IncomingBodyFinish github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_IncomingBodyFinish func wasmimport_IncomingBodyFinish(this0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[static]incoming-body.finish", func() unsafe.Pointer { ptr := unsafe.Pointer(&this0) __p.Pin(ptr) @@ -1352,16 +1352,16 @@ func wasmimport_IncomingBodyFinish(this0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutgoingBodyFinish github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_OutgoingBodyFinish -func wasmimport_OutgoingBodyFinish(this0 uint32, trailers0 uint32, trailers1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCode, struct{}, github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCode]) { +//go:linkname wasmimport_OutgoingBodyFinish github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_OutgoingBodyFinish +func wasmimport_OutgoingBodyFinish(this0 uint32, trailers0 uint32, trailers1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCode, struct{}, github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCode]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[static]outgoing-body.finish", func() unsafe.Pointer { ptr := unsafe.Pointer(&this0) __p.Pin(ptr) @@ -1380,16 +1380,16 @@ func wasmimport_OutgoingBodyFinish(this0 uint32, trailers0 uint32, trailers1 uin return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_ResponseOutparamSet github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_ResponseOutparamSet +//go:linkname wasmimport_ResponseOutparamSet github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_ResponseOutparamSet func wasmimport_ResponseOutparamSet(param0 uint32, response0 uint32, response1 uint32, response2 uint32, response3 uint64, response4 uint32, response5 uint32, response6 uint32, response7 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "[static]response-outparam.set", func() unsafe.Pointer { ptr := unsafe.Pointer(¶m0) __p.Pin(ptr) @@ -1428,16 +1428,16 @@ func wasmimport_ResponseOutparamSet(param0 uint32, response0 uint32, response1 u return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_HTTPErrorCode github.com/wasmCloud/west/bindings/wasi/http/types.wasmimport_HTTPErrorCode -func wasmimport_HTTPErrorCode(err0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__west__bindings__wasi__http__types.ErrorCode]) { +//go:linkname wasmimport_HTTPErrorCode github.com/wasmCloud/wadge/bindings/wasi/http/types.wasmimport_HTTPErrorCode +func wasmimport_HTTPErrorCode(err0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__bindings__wasi__http__types.ErrorCode]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:http/types@0.2.1", "http-error-code", func() unsafe.Pointer { ptr := unsafe.Pointer(&err0) __p.Pin(ptr) @@ -1448,16 +1448,16 @@ func wasmimport_HTTPErrorCode(err0 uint32, result *github_com__bytecodealliance_ return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_ErrorToDebugString github.com/wasmCloud/west/bindings/wasi/io/error.wasmimport_ErrorToDebugString +//go:linkname wasmimport_ErrorToDebugString github.com/wasmCloud/wadge/bindings/wasi/io/error.wasmimport_ErrorToDebugString func wasmimport_ErrorToDebugString(self0 uint32, result *string) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/error@0.2.1", "[method]error.to-debug-string", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1468,48 +1468,48 @@ func wasmimport_ErrorToDebugString(self0 uint32, result *string) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_ErrorResourceDrop github.com/wasmCloud/west/bindings/wasi/io/error.wasmimport_ErrorResourceDrop +//go:linkname wasmimport_ErrorResourceDrop github.com/wasmCloud/wadge/bindings/wasi/io/error.wasmimport_ErrorResourceDrop func wasmimport_ErrorResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/error@0.2.1", "[resource-drop]error", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_PollableBlock github.com/wasmCloud/west/bindings/wasi/io/poll.wasmimport_PollableBlock +//go:linkname wasmimport_PollableBlock github.com/wasmCloud/wadge/bindings/wasi/io/poll.wasmimport_PollableBlock func wasmimport_PollableBlock(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/poll@0.2.1", "[method]pollable.block", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_PollableReady github.com/wasmCloud/west/bindings/wasi/io/poll.wasmimport_PollableReady +//go:linkname wasmimport_PollableReady github.com/wasmCloud/wadge/bindings/wasi/io/poll.wasmimport_PollableReady func wasmimport_PollableReady(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/poll@0.2.1", "[method]pollable.ready", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1520,32 +1520,32 @@ func wasmimport_PollableReady(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_PollableResourceDrop github.com/wasmCloud/west/bindings/wasi/io/poll.wasmimport_PollableResourceDrop +//go:linkname wasmimport_PollableResourceDrop github.com/wasmCloud/wadge/bindings/wasi/io/poll.wasmimport_PollableResourceDrop func wasmimport_PollableResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/poll@0.2.1", "[resource-drop]pollable", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_Poll github.com/wasmCloud/west/bindings/wasi/io/poll.wasmimport_Poll -func wasmimport_Poll(in0 *github_com__wasmCloud__west__bindings__wasi__io__poll.Pollable, in1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[uint32]) { +//go:linkname wasmimport_Poll github.com/wasmCloud/wadge/bindings/wasi/io/poll.wasmimport_Poll +func wasmimport_Poll(in0 *github_com__wasmCloud__wadge__bindings__wasi__io__poll.Pollable, in1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[uint32]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/poll@0.2.1", "poll", func() unsafe.Pointer { ptr := unsafe.Pointer(in0) __p.Pin(ptr) @@ -1560,16 +1560,16 @@ func wasmimport_Poll(in0 *github_com__wasmCloud__west__bindings__wasi__io__poll. return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_InputStreamBlockingRead github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_InputStreamBlockingRead -func wasmimport_InputStreamBlockingRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_InputStreamBlockingRead github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_InputStreamBlockingRead +func wasmimport_InputStreamBlockingRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.blocking-read", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1584,16 +1584,16 @@ func wasmimport_InputStreamBlockingRead(self0 uint32, len0 uint64, result *githu return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_InputStreamBlockingSkip github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_InputStreamBlockingSkip -func wasmimport_InputStreamBlockingSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_InputStreamBlockingSkip github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_InputStreamBlockingSkip +func wasmimport_InputStreamBlockingSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.blocking-skip", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1608,16 +1608,16 @@ func wasmimport_InputStreamBlockingSkip(self0 uint32, len0 uint64, result *githu return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_InputStreamRead github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_InputStreamRead -func wasmimport_InputStreamRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_InputStreamRead github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_InputStreamRead +func wasmimport_InputStreamRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.read", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1632,16 +1632,16 @@ func wasmimport_InputStreamRead(self0 uint32, len0 uint64, result *github_com__b return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_InputStreamSkip github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_InputStreamSkip -func wasmimport_InputStreamSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_InputStreamSkip github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_InputStreamSkip +func wasmimport_InputStreamSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.skip", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1656,16 +1656,16 @@ func wasmimport_InputStreamSkip(self0 uint32, len0 uint64, result *github_com__b return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_InputStreamSubscribe github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_InputStreamSubscribe +//go:linkname wasmimport_InputStreamSubscribe github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_InputStreamSubscribe func wasmimport_InputStreamSubscribe(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1676,16 +1676,16 @@ func wasmimport_InputStreamSubscribe(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamBlockingFlush github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingFlush -func wasmimport_OutputStreamBlockingFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamBlockingFlush github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingFlush +func wasmimport_OutputStreamBlockingFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1696,16 +1696,16 @@ func wasmimport_OutputStreamBlockingFlush(self0 uint32, result *github_com__byte return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamBlockingSplice github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingSplice -func wasmimport_OutputStreamBlockingSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamBlockingSplice github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingSplice +func wasmimport_OutputStreamBlockingSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-splice", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1724,16 +1724,16 @@ func wasmimport_OutputStreamBlockingSplice(self0 uint32, src0 uint32, len0 uint6 return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamBlockingWriteAndFlush github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteAndFlush -func wasmimport_OutputStreamBlockingWriteAndFlush(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamBlockingWriteAndFlush github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteAndFlush +func wasmimport_OutputStreamBlockingWriteAndFlush(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-write-and-flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1752,16 +1752,16 @@ func wasmimport_OutputStreamBlockingWriteAndFlush(self0 uint32, contents0 *uint8 return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamBlockingWriteZeroesAndFlush github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteZeroesAndFlush -func wasmimport_OutputStreamBlockingWriteZeroesAndFlush(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamBlockingWriteZeroesAndFlush github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteZeroesAndFlush +func wasmimport_OutputStreamBlockingWriteZeroesAndFlush(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-write-zeroes-and-flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1776,16 +1776,16 @@ func wasmimport_OutputStreamBlockingWriteZeroesAndFlush(self0 uint32, len0 uint6 return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamCheckWrite github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamCheckWrite -func wasmimport_OutputStreamCheckWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamCheckWrite github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamCheckWrite +func wasmimport_OutputStreamCheckWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.check-write", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1796,16 +1796,16 @@ func wasmimport_OutputStreamCheckWrite(self0 uint32, result *github_com__bytecod return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamFlush github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamFlush -func wasmimport_OutputStreamFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamFlush github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamFlush +func wasmimport_OutputStreamFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1816,16 +1816,16 @@ func wasmimport_OutputStreamFlush(self0 uint32, result *github_com__bytecodealli return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamSplice github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamSplice -func wasmimport_OutputStreamSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamSplice github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamSplice +func wasmimport_OutputStreamSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.splice", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1844,16 +1844,16 @@ func wasmimport_OutputStreamSplice(self0 uint32, src0 uint32, len0 uint64, resul return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamSubscribe github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamSubscribe +//go:linkname wasmimport_OutputStreamSubscribe github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamSubscribe func wasmimport_OutputStreamSubscribe(self0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1864,16 +1864,16 @@ func wasmimport_OutputStreamSubscribe(self0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamWrite github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamWrite -func wasmimport_OutputStreamWrite(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamWrite github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamWrite +func wasmimport_OutputStreamWrite(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.write", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1892,16 +1892,16 @@ func wasmimport_OutputStreamWrite(self0 uint32, contents0 *uint8, contents1 uint return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamWriteZeroes github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamWriteZeroes -func wasmimport_OutputStreamWriteZeroes(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__west__bindings__wasi__io__streams.StreamError]) { +//go:linkname wasmimport_OutputStreamWriteZeroes github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamWriteZeroes +func wasmimport_OutputStreamWriteZeroes(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__bindings__wasi__io__streams.StreamError]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.write-zeroes", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) @@ -1916,48 +1916,48 @@ func wasmimport_OutputStreamWriteZeroes(self0 uint32, len0 uint64, result *githu return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_InputStreamResourceDrop github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_InputStreamResourceDrop +//go:linkname wasmimport_InputStreamResourceDrop github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_InputStreamResourceDrop func wasmimport_InputStreamResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[resource-drop]input-stream", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_OutputStreamResourceDrop github.com/wasmCloud/west/bindings/wasi/io/streams.wasmimport_OutputStreamResourceDrop +//go:linkname wasmimport_OutputStreamResourceDrop github.com/wasmCloud/wadge/bindings/wasi/io/streams.wasmimport_OutputStreamResourceDrop func wasmimport_OutputStreamResourceDrop(self0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasi:io/streams@0.2.1", "[resource-drop]output-stream", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_NewIncomingRequest github.com/wasmCloud/west/bindings/wasiext/http/ext.wasmimport_NewIncomingRequest +//go:linkname wasmimport_NewIncomingRequest github.com/wasmCloud/wadge/bindings/wasiext/http/ext.wasmimport_NewIncomingRequest func wasmimport_NewIncomingRequest(req0 uint32) (result0 uint32) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasiext:http/ext@0.1.0", "new-incoming-request", func() unsafe.Pointer { ptr := unsafe.Pointer(&req0) __p.Pin(ptr) @@ -1968,23 +1968,23 @@ func wasmimport_NewIncomingRequest(req0 uint32) (result0 uint32) { return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } -//go:linkname wasmimport_NewResponseOutparam github.com/wasmCloud/west/bindings/wasiext/http/ext.wasmimport_NewResponseOutparam -func wasmimport_NewResponseOutparam(result *github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__west__bindings__wasi__http__types.ResponseOutparam, github_com__wasmCloud__west__bindings__wasi__http__types.FutureIncomingResponse]) { +//go:linkname wasmimport_NewResponseOutparam github.com/wasmCloud/wadge/bindings/wasiext/http/ext.wasmimport_NewResponseOutparam +func wasmimport_NewResponseOutparam(result *github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__wadge__bindings__wasi__http__types.ResponseOutparam, github_com__wasmCloud__wadge__bindings__wasi__http__types.FutureIncomingResponse]) { var __p runtime.Pinner defer __p.Unpin() - if __err := west.WithCurrentInstance(func(__instance *west.Instance) error { + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { return __instance.Call("wasiext:http/ext@0.1.0", "new-response-outparam", func() unsafe.Pointer { ptr := unsafe.Pointer(result) __p.Pin(ptr) return ptr }()) }); __err != nil { - west.CurrentErrorHandler()(__err) + wadge.CurrentErrorHandler()(__err) } return } diff --git a/bindings/wadge.go b/bindings/wadge.go new file mode 100644 index 0000000..b4b8bb1 --- /dev/null +++ b/bindings/wadge.go @@ -0,0 +1,7 @@ +//go:generate go run github.com/wasmCloud/wadge/cmd/wadge-bindgen-go -package bindings -output bindings.go + +package bindings + +import ( + _ "github.com/wasmCloud/wadge/bindings/wasiext/http/ext" +) diff --git a/bindings/wadge/wadge/imports/imports.wit.go b/bindings/wadge/wadge/imports/imports.wit.go new file mode 100644 index 0000000..ae3ba42 --- /dev/null +++ b/bindings/wadge/wadge/imports/imports.wit.go @@ -0,0 +1,4 @@ +// Code generated by wit-bindgen-go. DO NOT EDIT. + +// Package imports represents the world "wadge:wadge/imports@0.1.0". +package imports diff --git a/bindings/wasi/cli/stderr/stderr.wit.go b/bindings/wasi/cli/stderr/stderr.wit.go index 130a21e..79f8324 100644 --- a/bindings/wasi/cli/stderr/stderr.wit.go +++ b/bindings/wasi/cli/stderr/stderr.wit.go @@ -5,7 +5,7 @@ package stderr import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/bindings/wasi/io/streams" ) // GetStderr represents the imported function "get-stderr". diff --git a/bindings/wasi/cli/stdin/stdin.wit.go b/bindings/wasi/cli/stdin/stdin.wit.go index db5c60e..9c654f4 100644 --- a/bindings/wasi/cli/stdin/stdin.wit.go +++ b/bindings/wasi/cli/stdin/stdin.wit.go @@ -5,7 +5,7 @@ package stdin import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/bindings/wasi/io/streams" ) // GetStdin represents the imported function "get-stdin". diff --git a/bindings/wasi/cli/stdout/stdout.wit.go b/bindings/wasi/cli/stdout/stdout.wit.go index a84b7eb..f103748 100644 --- a/bindings/wasi/cli/stdout/stdout.wit.go +++ b/bindings/wasi/cli/stdout/stdout.wit.go @@ -5,7 +5,7 @@ package stdout import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/bindings/wasi/io/streams" ) // GetStdout represents the imported function "get-stdout". diff --git a/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go b/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go index 8c318c1..850d0e9 100644 --- a/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go +++ b/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go @@ -8,7 +8,7 @@ package terminalstderr import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminaloutput "github.com/wasmCloud/west/bindings/wasi/cli/terminal-output" + terminaloutput "github.com/wasmCloud/wadge/bindings/wasi/cli/terminal-output" ) // GetTerminalStderr represents the imported function "get-terminal-stderr". diff --git a/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go b/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go index 02ebc35..3612159 100644 --- a/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go +++ b/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go @@ -8,7 +8,7 @@ package terminalstdin import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminalinput "github.com/wasmCloud/west/bindings/wasi/cli/terminal-input" + terminalinput "github.com/wasmCloud/wadge/bindings/wasi/cli/terminal-input" ) // GetTerminalStdin represents the imported function "get-terminal-stdin". diff --git a/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go b/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go index 24a6395..d6a8f61 100644 --- a/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go +++ b/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go @@ -8,7 +8,7 @@ package terminalstdout import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminaloutput "github.com/wasmCloud/west/bindings/wasi/cli/terminal-output" + terminaloutput "github.com/wasmCloud/wadge/bindings/wasi/cli/terminal-output" ) // GetTerminalStdout represents the imported function "get-terminal-stdout". diff --git a/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go b/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go index ea1eb13..046daa4 100644 --- a/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go +++ b/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go @@ -14,7 +14,7 @@ package monotonicclock import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/bindings/wasi/io/poll" ) // Instant represents the u64 "wasi:clocks/monotonic-clock@0.2.1#instant". diff --git a/bindings/wasi/clocks/timezone/abi.go b/bindings/wasi/clocks/timezone/abi.go index b1e89b0..6cec072 100644 --- a/bindings/wasi/clocks/timezone/abi.go +++ b/bindings/wasi/clocks/timezone/abi.go @@ -3,7 +3,7 @@ package timezone import ( - wallclock "github.com/wasmCloud/west/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/bindings/wasi/clocks/wall-clock" ) func lower_DateTime(v wallclock.DateTime) (f0 uint64, f1 uint32) { diff --git a/bindings/wasi/clocks/timezone/timezone.wit.go b/bindings/wasi/clocks/timezone/timezone.wit.go index 2acfebc..b33462e 100644 --- a/bindings/wasi/clocks/timezone/timezone.wit.go +++ b/bindings/wasi/clocks/timezone/timezone.wit.go @@ -4,7 +4,7 @@ package timezone import ( - wallclock "github.com/wasmCloud/west/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/bindings/wasi/clocks/wall-clock" ) // TimezoneDisplay represents the record "wasi:clocks/timezone@0.2.1#timezone-display". diff --git a/bindings/wasi/filesystem/preopens/preopens.wit.go b/bindings/wasi/filesystem/preopens/preopens.wit.go index 8462c07..70d1cdd 100644 --- a/bindings/wasi/filesystem/preopens/preopens.wit.go +++ b/bindings/wasi/filesystem/preopens/preopens.wit.go @@ -5,7 +5,7 @@ package preopens import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/filesystem/types" + "github.com/wasmCloud/wadge/bindings/wasi/filesystem/types" ) // GetDirectories represents the imported function "get-directories". diff --git a/bindings/wasi/filesystem/types/abi.go b/bindings/wasi/filesystem/types/abi.go index 79d3652..bce4495 100644 --- a/bindings/wasi/filesystem/types/abi.go +++ b/bindings/wasi/filesystem/types/abi.go @@ -4,7 +4,7 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - wallclock "github.com/wasmCloud/west/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/bindings/wasi/clocks/wall-clock" "unsafe" ) diff --git a/bindings/wasi/filesystem/types/types.wit.go b/bindings/wasi/filesystem/types/types.wit.go index 28c16db..4f9d92b 100644 --- a/bindings/wasi/filesystem/types/types.wit.go +++ b/bindings/wasi/filesystem/types/types.wit.go @@ -30,9 +30,9 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - wallclock "github.com/wasmCloud/west/bindings/wasi/clocks/wall-clock" - ioerror "github.com/wasmCloud/west/bindings/wasi/io/error" - "github.com/wasmCloud/west/bindings/wasi/io/streams" + wallclock "github.com/wasmCloud/wadge/bindings/wasi/clocks/wall-clock" + ioerror "github.com/wasmCloud/wadge/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/bindings/wasi/io/streams" ) // FileSize represents the u64 "wasi:filesystem/types@0.2.1#filesize". diff --git a/bindings/wasi/http/outgoing-handler/abi.go b/bindings/wasi/http/outgoing-handler/abi.go index efe1f3b..b4f8cd4 100644 --- a/bindings/wasi/http/outgoing-handler/abi.go +++ b/bindings/wasi/http/outgoing-handler/abi.go @@ -4,7 +4,7 @@ package outgoinghandler import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/bindings/wasi/http/types" "unsafe" ) diff --git a/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go b/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go index 3a5f7ef..ab2203f 100644 --- a/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go +++ b/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go @@ -8,7 +8,7 @@ package outgoinghandler import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/bindings/wasi/http/types" ) // Handle represents the imported function "handle". diff --git a/bindings/wasi/http/types/abi.go b/bindings/wasi/http/types/abi.go index adc4e0c..195fbd2 100644 --- a/bindings/wasi/http/types/abi.go +++ b/bindings/wasi/http/types/abi.go @@ -4,7 +4,7 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock" + monotonicclock "github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock" "unsafe" ) diff --git a/bindings/wasi/http/types/types.wit.go b/bindings/wasi/http/types/types.wit.go index a53a6ab..8bd237d 100644 --- a/bindings/wasi/http/types/types.wit.go +++ b/bindings/wasi/http/types/types.wit.go @@ -9,10 +9,10 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock" - ioerror "github.com/wasmCloud/west/bindings/wasi/io/error" - "github.com/wasmCloud/west/bindings/wasi/io/poll" - "github.com/wasmCloud/west/bindings/wasi/io/streams" + monotonicclock "github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock" + ioerror "github.com/wasmCloud/wadge/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/bindings/wasi/io/streams" ) // Method represents the variant "wasi:http/types@0.2.1#method". diff --git a/bindings/wasi/io/streams/streams.wit.go b/bindings/wasi/io/streams/streams.wit.go index 7646fd7..d2f0b2a 100644 --- a/bindings/wasi/io/streams/streams.wit.go +++ b/bindings/wasi/io/streams/streams.wit.go @@ -11,8 +11,8 @@ package streams import ( "github.com/bytecodealliance/wasm-tools-go/cm" - ioerror "github.com/wasmCloud/west/bindings/wasi/io/error" - "github.com/wasmCloud/west/bindings/wasi/io/poll" + ioerror "github.com/wasmCloud/wadge/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/bindings/wasi/io/poll" ) // StreamError represents the imported variant "wasi:io/streams@0.2.1#stream-error". diff --git a/bindings/wasi/sockets/instance-network/instance-network.wit.go b/bindings/wasi/sockets/instance-network/instance-network.wit.go index 8325928..d0d9c0c 100644 --- a/bindings/wasi/sockets/instance-network/instance-network.wit.go +++ b/bindings/wasi/sockets/instance-network/instance-network.wit.go @@ -7,7 +7,7 @@ package instancenetwork import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" ) // InstanceNetwork represents the imported function "instance-network". diff --git a/bindings/wasi/sockets/ip-name-lookup/abi.go b/bindings/wasi/sockets/ip-name-lookup/abi.go index 091bf01..4be1925 100644 --- a/bindings/wasi/sockets/ip-name-lookup/abi.go +++ b/bindings/wasi/sockets/ip-name-lookup/abi.go @@ -4,7 +4,7 @@ package ipnamelookup import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" "unsafe" ) diff --git a/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go b/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go index 4b46667..6b799a9 100644 --- a/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go +++ b/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go @@ -5,8 +5,8 @@ package ipnamelookup import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/io/poll" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" ) // ResolveAddressStream represents the imported resource "wasi:sockets/ip-name-lookup@0.2.1#resolve-address-stream". diff --git a/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go b/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go index 181449e..a67ddac 100644 --- a/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go +++ b/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go @@ -5,8 +5,8 @@ package tcpcreatesocket import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" - "github.com/wasmCloud/west/bindings/wasi/sockets/tcp" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/tcp" ) // CreateTCPSocket represents the imported function "create-tcp-socket". diff --git a/bindings/wasi/sockets/tcp/abi.go b/bindings/wasi/sockets/tcp/abi.go index bf99cc1..d10a9b0 100644 --- a/bindings/wasi/sockets/tcp/abi.go +++ b/bindings/wasi/sockets/tcp/abi.go @@ -4,8 +4,8 @@ package tcp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/io/streams" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" "unsafe" ) diff --git a/bindings/wasi/sockets/tcp/tcp.wit.go b/bindings/wasi/sockets/tcp/tcp.wit.go index a5cc9be..8cc359f 100644 --- a/bindings/wasi/sockets/tcp/tcp.wit.go +++ b/bindings/wasi/sockets/tcp/tcp.wit.go @@ -5,10 +5,10 @@ package tcp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/bindings/wasi/clocks/monotonic-clock" - "github.com/wasmCloud/west/bindings/wasi/io/poll" - "github.com/wasmCloud/west/bindings/wasi/io/streams" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" + monotonicclock "github.com/wasmCloud/wadge/bindings/wasi/clocks/monotonic-clock" + "github.com/wasmCloud/wadge/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" ) // ShutdownType represents the enum "wasi:sockets/tcp@0.2.1#shutdown-type". diff --git a/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go b/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go index 2b3fbd3..37d4a50 100644 --- a/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go +++ b/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go @@ -5,8 +5,8 @@ package udpcreatesocket import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" - "github.com/wasmCloud/west/bindings/wasi/sockets/udp" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/udp" ) // CreateUDPSocket represents the imported function "create-udp-socket". diff --git a/bindings/wasi/sockets/udp/abi.go b/bindings/wasi/sockets/udp/abi.go index ebb59f2..f862e99 100644 --- a/bindings/wasi/sockets/udp/abi.go +++ b/bindings/wasi/sockets/udp/abi.go @@ -4,7 +4,7 @@ package udp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" "unsafe" ) diff --git a/bindings/wasi/sockets/udp/udp.wit.go b/bindings/wasi/sockets/udp/udp.wit.go index 7097da7..a4d50b0 100644 --- a/bindings/wasi/sockets/udp/udp.wit.go +++ b/bindings/wasi/sockets/udp/udp.wit.go @@ -5,8 +5,8 @@ package udp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/io/poll" - "github.com/wasmCloud/west/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/bindings/wasi/sockets/network" ) // IncomingDatagram represents the record "wasi:sockets/udp@0.2.1#incoming-datagram". diff --git a/bindings/wasiext/http/ext/ext.wit.go b/bindings/wasiext/http/ext/ext.wit.go index 878f326..a5b1928 100644 --- a/bindings/wasiext/http/ext/ext.wit.go +++ b/bindings/wasiext/http/ext/ext.wit.go @@ -5,7 +5,7 @@ package ext import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/bindings/wasi/http/types" ) // NewResponseOutparam represents the imported function "new-response-outparam". diff --git a/bindings/west.go b/bindings/west.go deleted file mode 100644 index 92df914..0000000 --- a/bindings/west.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:generate go run github.com/wasmCloud/west/cmd/west-bindgen-go -package bindings -output bindings.go - -package bindings - -import ( - _ "github.com/wasmCloud/west/bindings/wasiext/http/ext" -) diff --git a/bindings/west/west/imports/imports.wit.go b/bindings/west/west/imports/imports.wit.go deleted file mode 100644 index b5c43fd..0000000 --- a/bindings/west/west/imports/imports.wit.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by wit-bindgen-go. DO NOT EDIT. - -// Package imports represents the world "west:west/imports@0.1.0". -package imports diff --git a/ci/release.sh b/ci/release.sh index e6b6995..2c4e334 100755 --- a/ci/release.sh +++ b/ci/release.sh @@ -2,17 +2,17 @@ set -xe -id=$(gh run list -b main -w west -L 1 --json databaseId -q '.[].databaseId') +id=$(gh run list -b main -w wadge -L 1 --json databaseId -q '.[].databaseId') git clean -xf lib target/artifacts gh run download -D lib -n 'passthrough' "$id" -gh run download -D target/artifacts -p 'west-*' "$id" -mv -v target/artifacts/west-aarch64-apple-darwin/lib/libwest_sys.a ./lib/aarch64-darwin/libwest.a -mv -v target/artifacts/west-aarch64-linux-android/lib/libwest_sys.a ./lib/aarch64-android/libwest.a -mv -v target/artifacts/west-aarch64-unknown-linux-musl/lib/libwest_sys.a ./lib/aarch64-linux/libwest.a -mv -v target/artifacts/west-riscv64gc-unknown-linux-gnu/lib/libwest_sys.a ./lib/riscv64-linux/libwest.a -mv -v target/artifacts/west-x86_64-apple-darwin/lib/libwest_sys.a ./lib/x86_64-darwin/libwest.a -mv -v target/artifacts/west-x86_64-pc-windows-gnu/lib/libwest_sys.a ./lib/x86_64-windows/libwest.a -mv -v target/artifacts/west-x86_64-unknown-linux-musl/lib/libwest_sys.a ./lib/x86_64-linux/libwest.a +gh run download -D target/artifacts -p 'wadge-*' "$id" +mv -v target/artifacts/wadge-aarch64-apple-darwin/lib/libwadge_sys.a ./lib/aarch64-darwin/libwadge.a +mv -v target/artifacts/wadge-aarch64-linux-android/lib/libwadge_sys.a ./lib/aarch64-android/libwadge.a +mv -v target/artifacts/wadge-aarch64-unknown-linux-musl/lib/libwadge_sys.a ./lib/aarch64-linux/libwadge.a +mv -v target/artifacts/wadge-riscv64gc-unknown-linux-gnu/lib/libwadge_sys.a ./lib/riscv64-linux/libwadge.a +mv -v target/artifacts/wadge-x86_64-apple-darwin/lib/libwadge_sys.a ./lib/x86_64-darwin/libwadge.a +mv -v target/artifacts/wadge-x86_64-pc-windows-gnu/lib/libwadge_sys.a ./lib/x86_64-windows/libwadge.a +mv -v target/artifacts/wadge-x86_64-unknown-linux-musl/lib/libwadge_sys.a ./lib/x86_64-linux/libwadge.a git reset git add -f lib git commit -Ss -m 'build: add build artifacts' diff --git a/cmd/west-bindgen-go/main.go b/cmd/wadge-bindgen-go/main.go similarity index 97% rename from cmd/west-bindgen-go/main.go rename to cmd/wadge-bindgen-go/main.go index b0c6141..815ff4d 100644 --- a/cmd/west-bindgen-go/main.go +++ b/cmd/wadge-bindgen-go/main.go @@ -19,7 +19,7 @@ import ( ) var ( - output = flag.String("output", "west_bindings_test.go", "output file path from the root of the package directory") + output = flag.String("output", "wadge_bindings_test.go", "output file path from the root of the package directory") gofmt = flag.Bool("gofmt", true, "whether to format the generated code") pkgName = flag.String("package", "", "package name, defaults to test package at path specified") @@ -28,7 +28,7 @@ var ( Sel: &ast.Ident{Name: "Pointer"}, } instanceTy = &ast.SelectorExpr{ - X: &ast.Ident{Name: "west"}, + X: &ast.Ident{Name: "wadge"}, Sel: &ast.Ident{Name: "Instance"}, } instancePtrTy = &ast.StarExpr{X: instanceTy} @@ -355,7 +355,7 @@ func generate(path string) error { Rhs: []ast.Expr{ &ast.CallExpr{ Fun: &ast.SelectorExpr{ - X: &ast.Ident{Name: "west"}, + X: &ast.Ident{Name: "wadge"}, Sel: &ast.Ident{Name: "WithCurrentInstance"}, }, Args: []ast.Expr{ @@ -414,7 +414,7 @@ func generate(path string) error { X: &ast.CallExpr{ Fun: &ast.CallExpr{ Fun: &ast.SelectorExpr{ - X: &ast.Ident{Name: "west"}, + X: &ast.Ident{Name: "wadge"}, Sel: &ast.Ident{Name: "CurrentErrorHandler"}, }, }, @@ -468,8 +468,8 @@ func generate(path string) error { Path: &ast.BasicLit{Kind: token.STRING, Value: `"unsafe"`}, }, { - Name: &ast.Ident{Name: "west"}, - Path: &ast.BasicLit{Kind: token.STRING, Value: `"github.com/wasmCloud/west"`}, + Name: &ast.Ident{Name: "wadge"}, + Path: &ast.BasicLit{Kind: token.STRING, Value: `"github.com/wasmCloud/wadge"`}, }, } for path, name := range goImports { @@ -516,7 +516,7 @@ func generate(path string) error { decls = append(decls, wi.decl) } var buf bytes.Buffer - buf.WriteString("// Code generated by west-bindgen-go DO NOT EDIT\n\n") + buf.WriteString("// Code generated by wadge-bindgen-go DO NOT EDIT\n\n") f := &ast.File{ Name: &ast.Ident{Name: name}, Imports: importSpecs, diff --git a/crates/generate-header/src/main.rs b/crates/generate-header/src/main.rs index 42b5544..8dda639 100644 --- a/crates/generate-header/src/main.rs +++ b/crates/generate-header/src/main.rs @@ -21,6 +21,6 @@ fn main() -> anyhow::Result<()> { }, ) .context("failed to generate bindings")?; - bindings.write_to_file(root.join("include").join("west.h")); + bindings.write_to_file(root.join("include").join("wadge.h")); Ok(()) } diff --git a/crates/passthrough/Cargo.toml b/crates/passthrough/Cargo.toml index df9d995..c6e8c97 100644 --- a/crates/passthrough/Cargo.toml +++ b/crates/passthrough/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "west-passthrough" +name = "wadge-passthrough" version = "0.2.0" description = "WebAssembly component, which reexports WASI from the host" diff --git a/crates/sys/Cargo.toml b/crates/sys/Cargo.toml index b11c561..08fec41 100644 --- a/crates/sys/Cargo.toml +++ b/crates/sys/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "west-sys" -version = "0.2.0" -description = "WebAssembly component test runtime C bindings" +name = "wadge-sys" +version = "0.3.0" +description = "WebAssembly bridge for native code" authors.workspace = true categories.workspace = true @@ -17,7 +17,7 @@ crate-type = ["staticlib"] anyhow = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["ansi", "env-filter", "fmt"] } +wadge = { workspace = true } wasmtime = { workspace = true } wasmtime-cabish = { workspace = true } wasmtime-wasi = { workspace = true } -west = { workspace = true } diff --git a/crates/sys/src/lib.rs b/crates/sys/src/lib.rs index 760c5f2..42b7dfb 100644 --- a/crates/sys/src/lib.rs +++ b/crates/sys/src/lib.rs @@ -29,7 +29,7 @@ pub struct Config { } pub struct Instance { - instance: Mutex, + instance: Mutex, subscriber: Arc, } @@ -38,14 +38,14 @@ fn instantiate(config: Config) -> anyhow::Result { let Config { wasm } = config; ensure!(!wasm.ptr.is_null(), "`wasm_ptr` must not be null"); let wasm = unsafe { slice::from_raw_parts(wasm.ptr, wasm.len) }; - let instance = west::instantiate(west::Config { + let instance = wadge::instantiate(wadge::Config { engine: ENGINE.clone(), wasm, }) .context("failed to instantiate component")?; let subscriber = tracing_subscriber::fmt() .without_time() - .with_env_filter(EnvFilter::from_env("WEST_LOG")) + .with_env_filter(EnvFilter::from_env("WADGE_LOG")) .finish(); Ok(Instance { instance: instance.into(), diff --git a/examples/go/http/bindings/west-examples/http/app/app.wit.go b/examples/go/http/bindings/wadge-examples/http/app/app.wit.go similarity index 50% rename from examples/go/http/bindings/west-examples/http/app/app.wit.go rename to examples/go/http/bindings/wadge-examples/http/app/app.wit.go index 324bc91..f759a31 100644 --- a/examples/go/http/bindings/west-examples/http/app/app.wit.go +++ b/examples/go/http/bindings/wadge-examples/http/app/app.wit.go @@ -1,4 +1,4 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package app represents the world "west-examples:http/app". +// Package app represents the world "wadge-examples:http/app". package app diff --git a/examples/go/http/bindings/wasi/cli/stderr/stderr.wit.go b/examples/go/http/bindings/wasi/cli/stderr/stderr.wit.go index 468443a..5170768 100644 --- a/examples/go/http/bindings/wasi/cli/stderr/stderr.wit.go +++ b/examples/go/http/bindings/wasi/cli/stderr/stderr.wit.go @@ -5,7 +5,7 @@ package stderr import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" ) // GetStderr represents the imported function "get-stderr". diff --git a/examples/go/http/bindings/wasi/cli/stdin/stdin.wit.go b/examples/go/http/bindings/wasi/cli/stdin/stdin.wit.go index dd2badf..e5e44be 100644 --- a/examples/go/http/bindings/wasi/cli/stdin/stdin.wit.go +++ b/examples/go/http/bindings/wasi/cli/stdin/stdin.wit.go @@ -5,7 +5,7 @@ package stdin import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" ) // GetStdin represents the imported function "get-stdin". diff --git a/examples/go/http/bindings/wasi/cli/stdout/stdout.wit.go b/examples/go/http/bindings/wasi/cli/stdout/stdout.wit.go index 99242c5..1679c02 100644 --- a/examples/go/http/bindings/wasi/cli/stdout/stdout.wit.go +++ b/examples/go/http/bindings/wasi/cli/stdout/stdout.wit.go @@ -5,7 +5,7 @@ package stdout import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" ) // GetStdout represents the imported function "get-stdout". diff --git a/examples/go/http/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go b/examples/go/http/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go index a52426c..2cd716c 100644 --- a/examples/go/http/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go +++ b/examples/go/http/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go @@ -8,7 +8,7 @@ package terminalstderr import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminaloutput "github.com/wasmCloud/west/examples/go/http/bindings/wasi/cli/terminal-output" + terminaloutput "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/cli/terminal-output" ) // GetTerminalStderr represents the imported function "get-terminal-stderr". diff --git a/examples/go/http/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go b/examples/go/http/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go index ffc4afe..b922e0e 100644 --- a/examples/go/http/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go +++ b/examples/go/http/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go @@ -8,7 +8,7 @@ package terminalstdin import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminalinput "github.com/wasmCloud/west/examples/go/http/bindings/wasi/cli/terminal-input" + terminalinput "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/cli/terminal-input" ) // GetTerminalStdin represents the imported function "get-terminal-stdin". diff --git a/examples/go/http/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go b/examples/go/http/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go index 5c18538..f9273eb 100644 --- a/examples/go/http/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go +++ b/examples/go/http/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go @@ -8,7 +8,7 @@ package terminalstdout import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminaloutput "github.com/wasmCloud/west/examples/go/http/bindings/wasi/cli/terminal-output" + terminaloutput "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/cli/terminal-output" ) // GetTerminalStdout represents the imported function "get-terminal-stdout". diff --git a/examples/go/http/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go b/examples/go/http/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go index dcb2a17..fc5c8f8 100644 --- a/examples/go/http/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go +++ b/examples/go/http/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go @@ -14,7 +14,7 @@ package monotonicclock import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" ) // Instant represents the u64 "wasi:clocks/monotonic-clock@0.2.1#instant". diff --git a/examples/go/http/bindings/wasi/clocks/timezone/abi.go b/examples/go/http/bindings/wasi/clocks/timezone/abi.go index fe665ea..93aefb2 100644 --- a/examples/go/http/bindings/wasi/clocks/timezone/abi.go +++ b/examples/go/http/bindings/wasi/clocks/timezone/abi.go @@ -3,7 +3,7 @@ package timezone import ( - wallclock "github.com/wasmCloud/west/examples/go/http/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/wall-clock" ) func lower_DateTime(v wallclock.DateTime) (f0 uint64, f1 uint32) { diff --git a/examples/go/http/bindings/wasi/clocks/timezone/timezone.wit.go b/examples/go/http/bindings/wasi/clocks/timezone/timezone.wit.go index f50200a..fa0024a 100644 --- a/examples/go/http/bindings/wasi/clocks/timezone/timezone.wit.go +++ b/examples/go/http/bindings/wasi/clocks/timezone/timezone.wit.go @@ -4,7 +4,7 @@ package timezone import ( - wallclock "github.com/wasmCloud/west/examples/go/http/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/wall-clock" ) // TimezoneDisplay represents the record "wasi:clocks/timezone@0.2.1#timezone-display". diff --git a/examples/go/http/bindings/wasi/filesystem/preopens/preopens.wit.go b/examples/go/http/bindings/wasi/filesystem/preopens/preopens.wit.go index 11e38f9..bf1a506 100644 --- a/examples/go/http/bindings/wasi/filesystem/preopens/preopens.wit.go +++ b/examples/go/http/bindings/wasi/filesystem/preopens/preopens.wit.go @@ -5,7 +5,7 @@ package preopens import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/filesystem/types" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/filesystem/types" ) // GetDirectories represents the imported function "get-directories". diff --git a/examples/go/http/bindings/wasi/filesystem/types/abi.go b/examples/go/http/bindings/wasi/filesystem/types/abi.go index e8da877..ca2c68f 100644 --- a/examples/go/http/bindings/wasi/filesystem/types/abi.go +++ b/examples/go/http/bindings/wasi/filesystem/types/abi.go @@ -4,7 +4,7 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - wallclock "github.com/wasmCloud/west/examples/go/http/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/wall-clock" "unsafe" ) diff --git a/examples/go/http/bindings/wasi/filesystem/types/types.wit.go b/examples/go/http/bindings/wasi/filesystem/types/types.wit.go index 196ca79..ebabf2b 100644 --- a/examples/go/http/bindings/wasi/filesystem/types/types.wit.go +++ b/examples/go/http/bindings/wasi/filesystem/types/types.wit.go @@ -30,9 +30,9 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - wallclock "github.com/wasmCloud/west/examples/go/http/bindings/wasi/clocks/wall-clock" - ioerror "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/error" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/streams" + wallclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/wall-clock" + ioerror "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" ) // FileSize represents the u64 "wasi:filesystem/types@0.2.1#filesize". diff --git a/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.exports.go b/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.exports.go index 5f1ce46..5f73131 100644 --- a/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.exports.go +++ b/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.exports.go @@ -3,7 +3,7 @@ package incominghandler import ( - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/http/types" ) // Exports represents the caller-defined exports from "wasi:http/incoming-handler@0.2.1". diff --git a/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.wit.go b/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.wit.go index 9797136..e95d9fd 100644 --- a/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.wit.go +++ b/examples/go/http/bindings/wasi/http/incoming-handler/incoming-handler.wit.go @@ -8,7 +8,7 @@ package incominghandler import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/http/types" ) //go:wasmexport wasi:http/incoming-handler@0.2.1#handle diff --git a/examples/go/http/bindings/wasi/http/outgoing-handler/abi.go b/examples/go/http/bindings/wasi/http/outgoing-handler/abi.go index ab809fd..bd00f77 100644 --- a/examples/go/http/bindings/wasi/http/outgoing-handler/abi.go +++ b/examples/go/http/bindings/wasi/http/outgoing-handler/abi.go @@ -4,7 +4,7 @@ package outgoinghandler import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/http/types" "unsafe" ) diff --git a/examples/go/http/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go b/examples/go/http/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go index aeaa03f..cd87207 100644 --- a/examples/go/http/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go +++ b/examples/go/http/bindings/wasi/http/outgoing-handler/outgoing-handler.wit.go @@ -8,7 +8,7 @@ package outgoinghandler import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/http/types" ) // Handle represents the imported function "handle". diff --git a/examples/go/http/bindings/wasi/http/types/abi.go b/examples/go/http/bindings/wasi/http/types/abi.go index e3ddac8..f76f564 100644 --- a/examples/go/http/bindings/wasi/http/types/abi.go +++ b/examples/go/http/bindings/wasi/http/types/abi.go @@ -4,7 +4,7 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/examples/go/http/bindings/wasi/clocks/monotonic-clock" + monotonicclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/monotonic-clock" "unsafe" ) diff --git a/examples/go/http/bindings/wasi/http/types/types.wit.go b/examples/go/http/bindings/wasi/http/types/types.wit.go index 73d7220..2422ed1 100644 --- a/examples/go/http/bindings/wasi/http/types/types.wit.go +++ b/examples/go/http/bindings/wasi/http/types/types.wit.go @@ -9,10 +9,10 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/examples/go/http/bindings/wasi/clocks/monotonic-clock" - ioerror "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/error" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/poll" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/streams" + monotonicclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/monotonic-clock" + ioerror "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" ) // Method represents the variant "wasi:http/types@0.2.1#method". diff --git a/examples/go/http/bindings/wasi/io/streams/streams.wit.go b/examples/go/http/bindings/wasi/io/streams/streams.wit.go index f91a9c4..2a06d81 100644 --- a/examples/go/http/bindings/wasi/io/streams/streams.wit.go +++ b/examples/go/http/bindings/wasi/io/streams/streams.wit.go @@ -11,8 +11,8 @@ package streams import ( "github.com/bytecodealliance/wasm-tools-go/cm" - ioerror "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/error" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/poll" + ioerror "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" ) // StreamError represents the imported variant "wasi:io/streams@0.2.1#stream-error". diff --git a/examples/go/http/bindings/wasi/sockets/instance-network/instance-network.wit.go b/examples/go/http/bindings/wasi/sockets/instance-network/instance-network.wit.go index 4b00fba..4fcd572 100644 --- a/examples/go/http/bindings/wasi/sockets/instance-network/instance-network.wit.go +++ b/examples/go/http/bindings/wasi/sockets/instance-network/instance-network.wit.go @@ -7,7 +7,7 @@ package instancenetwork import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" ) // InstanceNetwork represents the imported function "instance-network". diff --git a/examples/go/http/bindings/wasi/sockets/ip-name-lookup/abi.go b/examples/go/http/bindings/wasi/sockets/ip-name-lookup/abi.go index 57d65fe..889b4aa 100644 --- a/examples/go/http/bindings/wasi/sockets/ip-name-lookup/abi.go +++ b/examples/go/http/bindings/wasi/sockets/ip-name-lookup/abi.go @@ -4,7 +4,7 @@ package ipnamelookup import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" "unsafe" ) diff --git a/examples/go/http/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go b/examples/go/http/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go index 071b7a1..ac54ac6 100644 --- a/examples/go/http/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go +++ b/examples/go/http/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go @@ -5,8 +5,8 @@ package ipnamelookup import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/poll" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" ) // ResolveAddressStream represents the imported resource "wasi:sockets/ip-name-lookup@0.2.1#resolve-address-stream". diff --git a/examples/go/http/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go b/examples/go/http/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go index 1d98ce8..780d075 100644 --- a/examples/go/http/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go +++ b/examples/go/http/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go @@ -5,8 +5,8 @@ package tcpcreatesocket import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/tcp" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/tcp" ) // CreateTCPSocket represents the imported function "create-tcp-socket". diff --git a/examples/go/http/bindings/wasi/sockets/tcp/abi.go b/examples/go/http/bindings/wasi/sockets/tcp/abi.go index 1855ea4..ff40fb0 100644 --- a/examples/go/http/bindings/wasi/sockets/tcp/abi.go +++ b/examples/go/http/bindings/wasi/sockets/tcp/abi.go @@ -4,8 +4,8 @@ package tcp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/streams" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" "unsafe" ) diff --git a/examples/go/http/bindings/wasi/sockets/tcp/tcp.wit.go b/examples/go/http/bindings/wasi/sockets/tcp/tcp.wit.go index f7d3ea9..10182e8 100644 --- a/examples/go/http/bindings/wasi/sockets/tcp/tcp.wit.go +++ b/examples/go/http/bindings/wasi/sockets/tcp/tcp.wit.go @@ -5,10 +5,10 @@ package tcp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/examples/go/http/bindings/wasi/clocks/monotonic-clock" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/poll" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/streams" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" + monotonicclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/monotonic-clock" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" ) // ShutdownType represents the enum "wasi:sockets/tcp@0.2.1#shutdown-type". diff --git a/examples/go/http/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go b/examples/go/http/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go index 74b4b05..bd004e0 100644 --- a/examples/go/http/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go +++ b/examples/go/http/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go @@ -5,8 +5,8 @@ package udpcreatesocket import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/udp" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/udp" ) // CreateUDPSocket represents the imported function "create-udp-socket". diff --git a/examples/go/http/bindings/wasi/sockets/udp/abi.go b/examples/go/http/bindings/wasi/sockets/udp/abi.go index c3a03d8..43a58f7 100644 --- a/examples/go/http/bindings/wasi/sockets/udp/abi.go +++ b/examples/go/http/bindings/wasi/sockets/udp/abi.go @@ -4,7 +4,7 @@ package udp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" "unsafe" ) diff --git a/examples/go/http/bindings/wasi/sockets/udp/udp.wit.go b/examples/go/http/bindings/wasi/sockets/udp/udp.wit.go index 9d4018f..fcfbe72 100644 --- a/examples/go/http/bindings/wasi/sockets/udp/udp.wit.go +++ b/examples/go/http/bindings/wasi/sockets/udp/udp.wit.go @@ -5,8 +5,8 @@ package udp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/io/poll" - "github.com/wasmCloud/west/examples/go/http/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" ) // IncomingDatagram represents the record "wasi:sockets/udp@0.2.1#incoming-datagram". diff --git a/examples/go/http/http.go b/examples/go/http/http.go index d671034..93672cb 100644 --- a/examples/go/http/http.go +++ b/examples/go/http/http.go @@ -7,8 +7,8 @@ import ( "unsafe" "github.com/bytecodealliance/wasm-tools-go/cm" - incominghandler "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/incoming-handler" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/types" + incominghandler "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/incoming-handler" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types" ) func init() { diff --git a/examples/go/http/http_test.go b/examples/go/http/http_test.go index c2787ef..d8b57b6 100644 --- a/examples/go/http/http_test.go +++ b/examples/go/http/http_test.go @@ -1,4 +1,4 @@ -//go:generate go run github.com/wasmCloud/west/cmd/west-bindgen-go +//go:generate go run github.com/wasmCloud/wadge/cmd/wadge-bindgen-go package wasi_test @@ -8,14 +8,14 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/wasmCloud/west" - _ "github.com/wasmCloud/west/bindings" - incominghandler "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/incoming-handler" - "github.com/wasmCloud/west/westhttp" + "github.com/wasmCloud/wadge" + _ "github.com/wasmCloud/wadge/bindings" + incominghandler "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/incoming-handler" + "github.com/wasmCloud/wadge/wadgehttp" ) func TestIncomingHandler(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { req, err := http.NewRequest("", "test", nil) if err != nil { t.Fatalf("failed to create new HTTP request: %s", err) @@ -23,7 +23,7 @@ func TestIncomingHandler(t *testing.T) { req.Header.Add("foo", "bar") req.Header.Add("foo", "baz") req.Header.Add("key", "value") - resp, err := westhttp.HandleIncomingRequest(incominghandler.Exports.Handle, req) + resp, err := wadgehttp.HandleIncomingRequest(incominghandler.Exports.Handle, req) if err != nil { t.Fatalf("failed to handle incoming HTTP request: %s", err) } diff --git a/examples/go/http/wadge_bindings_test.go b/examples/go/http/wadge_bindings_test.go new file mode 100644 index 0000000..e2176af --- /dev/null +++ b/examples/go/http/wadge_bindings_test.go @@ -0,0 +1,1954 @@ +// Code generated by wadge-bindgen-go DO NOT EDIT + +package wasi_test + +import ( + github_com__bytecodealliance__wasm___tools___go__cm "github.com/bytecodealliance/wasm-tools-go/cm" + wadge "github.com/wasmCloud/wadge" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__poll "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" + "runtime" + "unsafe" +) + +const _ string = runtime.Compiler + +var _ unsafe.Pointer + +//go:linkname wasmimport_Now github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_Now +func wasmimport_Now() (result0 uint64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "now", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_Resolution github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_Resolution +func wasmimport_Resolution() (result0 uint64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "resolution", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_SubscribeDuration github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeDuration +func wasmimport_SubscribeDuration(when0 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "subscribe-duration", func() unsafe.Pointer { + ptr := unsafe.Pointer(&when0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_SubscribeInstant github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeInstant +func wasmimport_SubscribeInstant(when0 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "subscribe-instant", func() unsafe.Pointer { + ptr := unsafe.Pointer(&when0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewFields github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewFields +func wasmimport_NewFields() (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]fields", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewOutgoingRequest github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewOutgoingRequest +func wasmimport_NewOutgoingRequest(headers0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]outgoing-request", func() unsafe.Pointer { + ptr := unsafe.Pointer(&headers0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewOutgoingResponse github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewOutgoingResponse +func wasmimport_NewOutgoingResponse(headers0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]outgoing-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&headers0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewRequestOptions github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewRequestOptions +func wasmimport_NewRequestOptions() (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]request-options", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsAppend github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsAppend +func wasmimport_FieldsAppend(self0 uint32, name0 *uint8, name1 uint32, value0 *uint8, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.append", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(value0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&value1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsClone github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsClone +func wasmimport_FieldsClone(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.clone", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsDelete github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsDelete +func wasmimport_FieldsDelete(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.delete", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsEntries github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsEntries +func wasmimport_FieldsEntries(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.entries", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsGet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsGet +func wasmimport_FieldsGet(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.get", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsHas github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsHas +func wasmimport_FieldsHas(self0 uint32, name0 *uint8, name1 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.has", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsSet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsSet +func wasmimport_FieldsSet(self0 uint32, name0 *uint8, name1 uint32, value0 *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.set", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(value0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&value1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureIncomingResponseGet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureIncomingResponseGet +func wasmimport_FutureIncomingResponseGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], struct{}]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-incoming-response.get", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureIncomingResponseSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureIncomingResponseSubscribe +func wasmimport_FutureIncomingResponseSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-incoming-response.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureTrailersGet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureTrailersGet +func wasmimport_FutureTrailersGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], struct{}]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-trailers.get", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureTrailersSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureTrailersSubscribe +func wasmimport_FutureTrailersSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-trailers.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingBodyStream github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingBodyStream +func wasmimport_IncomingBodyStream(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.InputStream, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.InputStream, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-body.stream", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestAuthority github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestAuthority +func wasmimport_IncomingRequestAuthority(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.authority", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestConsume github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestConsume +func wasmimport_IncomingRequestConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.consume", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestHeaders +func wasmimport_IncomingRequestHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestMethod github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestMethod +func wasmimport_IncomingRequestMethod(self0 uint32, result *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Method) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.method", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestPathWithQuery github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestPathWithQuery +func wasmimport_IncomingRequestPathWithQuery(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.path-with-query", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestScheme github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestScheme +func wasmimport_IncomingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Scheme]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.scheme", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseConsume github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseConsume +func wasmimport_IncomingResponseConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.consume", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseHeaders +func wasmimport_IncomingResponseHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseStatus github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseStatus +func wasmimport_IncomingResponseStatus(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.status", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingBodyWrite github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingBodyWrite +func wasmimport_OutgoingBodyWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.OutputStream, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.OutputStream, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-body.write", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestAuthority github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestAuthority +func wasmimport_OutgoingRequestAuthority(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.authority", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestBody github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestBody +func wasmimport_OutgoingRequestBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestHeaders +func wasmimport_OutgoingRequestHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestMethod github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestMethod +func wasmimport_OutgoingRequestMethod(self0 uint32, result *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Method) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.method", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestPathWithQuery github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestPathWithQuery +func wasmimport_OutgoingRequestPathWithQuery(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.path-with-query", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestScheme github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestScheme +func wasmimport_OutgoingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Scheme]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.scheme", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetAuthority github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetAuthority +func wasmimport_OutgoingRequestSetAuthority(self0 uint32, authority0 uint32, authority1 *uint8, authority2 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-authority", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&authority0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(authority1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&authority2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetMethod github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetMethod +func wasmimport_OutgoingRequestSetMethod(self0 uint32, method0 uint32, method1 *uint8, method2 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-method", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&method0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(method1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&method2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetPathWithQuery github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetPathWithQuery +func wasmimport_OutgoingRequestSetPathWithQuery(self0 uint32, pathWithQuery0 uint32, pathWithQuery1 *uint8, pathWithQuery2 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-path-with-query", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&pathWithQuery0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(pathWithQuery1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&pathWithQuery2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetScheme github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetScheme +func wasmimport_OutgoingRequestSetScheme(self0 uint32, scheme0 uint32, scheme1 uint32, scheme2 *uint8, scheme3 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-scheme", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&scheme0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&scheme1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(scheme2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&scheme3) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseBody github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseBody +func wasmimport_OutgoingResponseBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseHeaders +func wasmimport_OutgoingResponseHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseSetStatusCode github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseSetStatusCode +func wasmimport_OutgoingResponseSetStatusCode(self0 uint32, statusCode0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.set-status-code", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&statusCode0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseStatusCode github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseStatusCode +func wasmimport_OutgoingResponseStatusCode(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.status-code", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsBetweenBytesTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsBetweenBytesTimeout +func wasmimport_RequestOptionsBetweenBytesTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock.Duration]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.between-bytes-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsConnectTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsConnectTimeout +func wasmimport_RequestOptionsConnectTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock.Duration]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.connect-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsFirstByteTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsFirstByteTimeout +func wasmimport_RequestOptionsFirstByteTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock.Duration]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.first-byte-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsSetBetweenBytesTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsSetBetweenBytesTimeout +func wasmimport_RequestOptionsSetBetweenBytesTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-between-bytes-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsSetConnectTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsSetConnectTimeout +func wasmimport_RequestOptionsSetConnectTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-connect-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsSetFirstByteTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsSetFirstByteTimeout +func wasmimport_RequestOptionsSetFirstByteTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-first-byte-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsResourceDrop +func wasmimport_FieldsResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]fields", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureIncomingResponseResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureIncomingResponseResourceDrop +func wasmimport_FutureIncomingResponseResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]future-incoming-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureTrailersResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureTrailersResourceDrop +func wasmimport_FutureTrailersResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]future-trailers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingBodyResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingBodyResourceDrop +func wasmimport_IncomingBodyResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestResourceDrop +func wasmimport_IncomingRequestResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-request", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseResourceDrop +func wasmimport_IncomingResponseResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingBodyResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingBodyResourceDrop +func wasmimport_OutgoingBodyResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestResourceDrop +func wasmimport_OutgoingRequestResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-request", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseResourceDrop +func wasmimport_OutgoingResponseResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsResourceDrop +func wasmimport_RequestOptionsResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]request-options", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ResponseOutparamResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_ResponseOutparamResourceDrop +func wasmimport_ResponseOutparamResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]response-outparam", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsFromList github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsFromList +func wasmimport_FieldsFromList(entries0 *github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue], entries1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]fields.from-list", func() unsafe.Pointer { + ptr := unsafe.Pointer(entries0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&entries1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingBodyFinish github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingBodyFinish +func wasmimport_IncomingBodyFinish(this0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]incoming-body.finish", func() unsafe.Pointer { + ptr := unsafe.Pointer(&this0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingBodyFinish github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingBodyFinish +func wasmimport_OutgoingBodyFinish(this0 uint32, trailers0 uint32, trailers1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]outgoing-body.finish", func() unsafe.Pointer { + ptr := unsafe.Pointer(&this0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&trailers0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&trailers1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ResponseOutparamSet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_ResponseOutparamSet +func wasmimport_ResponseOutparamSet(param0 uint32, response0 uint32, response1 uint32, response2 uint32, response3 uint64, response4 uint32, response5 uint32, response6 uint32, response7 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]response-outparam.set", func() unsafe.Pointer { + ptr := unsafe.Pointer(¶m0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response3) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response4) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response5) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response6) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response7) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_HTTPErrorCode github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_HTTPErrorCode +func wasmimport_HTTPErrorCode(err0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "http-error-code", func() unsafe.Pointer { + ptr := unsafe.Pointer(&err0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ErrorToDebugString github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/error.wasmimport_ErrorToDebugString +func wasmimport_ErrorToDebugString(self0 uint32, result *string) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/error@0.2.1", "[method]error.to-debug-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ErrorResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/error.wasmimport_ErrorResourceDrop +func wasmimport_ErrorResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/error@0.2.1", "[resource-drop]error", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_PollableBlock github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_PollableBlock +func wasmimport_PollableBlock(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "[method]pollable.block", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_PollableReady github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_PollableReady +func wasmimport_PollableReady(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "[method]pollable.ready", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_PollableResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_PollableResourceDrop +func wasmimport_PollableResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "[resource-drop]pollable", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_Poll github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_Poll +func wasmimport_Poll(in0 *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__poll.Pollable, in1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[uint32]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "poll", func() unsafe.Pointer { + ptr := unsafe.Pointer(in0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&in1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamBlockingRead github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamBlockingRead +func wasmimport_InputStreamBlockingRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.blocking-read", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamBlockingSkip github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamBlockingSkip +func wasmimport_InputStreamBlockingSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.blocking-skip", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamRead github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamRead +func wasmimport_InputStreamRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.read", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamSkip github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamSkip +func wasmimport_InputStreamSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.skip", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamSubscribe +func wasmimport_InputStreamSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingFlush +func wasmimport_OutputStreamBlockingFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingSplice github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingSplice +func wasmimport_OutputStreamBlockingSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-splice", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&src0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingWriteAndFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteAndFlush +func wasmimport_OutputStreamBlockingWriteAndFlush(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-write-and-flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(contents0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&contents1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingWriteZeroesAndFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteZeroesAndFlush +func wasmimport_OutputStreamBlockingWriteZeroesAndFlush(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-write-zeroes-and-flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamCheckWrite github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamCheckWrite +func wasmimport_OutputStreamCheckWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.check-write", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamFlush +func wasmimport_OutputStreamFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamSplice github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamSplice +func wasmimport_OutputStreamSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.splice", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&src0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamSubscribe +func wasmimport_OutputStreamSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamWrite github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamWrite +func wasmimport_OutputStreamWrite(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.write", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(contents0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&contents1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamWriteZeroes github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamWriteZeroes +func wasmimport_OutputStreamWriteZeroes(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.write-zeroes", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamResourceDrop +func wasmimport_InputStreamResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[resource-drop]input-stream", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamResourceDrop +func wasmimport_OutputStreamResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[resource-drop]output-stream", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} diff --git a/examples/go/http/wit/app.wit b/examples/go/http/wit/app.wit index 245ac56..48c55a1 100644 --- a/examples/go/http/wit/app.wit +++ b/examples/go/http/wit/app.wit @@ -1,4 +1,4 @@ -package west-examples:http; +package wadge-examples:http; world app { include wasi:http/proxy@0.2.1; diff --git a/flake.nix b/flake.nix index 9659352..1b561b2 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ with nixify.lib; rust.mkFlake { src = ./.; - name = "west"; + name = "wadge"; overlays = [ wit-deps.overlays.fenix @@ -74,7 +74,7 @@ doCheck = false; # testing is performed in checks via `nextest` build.packages = [ - "west-sys" + "wadge-sys" ]; targets.arm-unknown-linux-gnueabihf = false; diff --git a/gen.go b/gen.go index 9bf662c..cc4fe99 100644 --- a/gen.go +++ b/gen.go @@ -2,4 +2,4 @@ //go:generate go run ./internal/generate -package west +package wadge diff --git a/gen_dev.go b/gen_dev.go index 73ac83d..68f25ab 100644 --- a/gen_dev.go +++ b/gen_dev.go @@ -2,4 +2,4 @@ //go:generate go run -tags=dev ./internal/generate -package west +package wadge diff --git a/go.mod b/go.mod index dbc58e6..1ea8bf4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/wasmCloud/west +module github.com/wasmCloud/wadge go 1.23.0 @@ -16,4 +16,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/wasmCloud/west v0.2.0 => ./. +replace github.com/wasmCloud/wadge v0.2.0 => ./. diff --git a/go.work b/go.work index 2fd3057..766fef4 100644 --- a/go.work +++ b/go.work @@ -2,4 +2,4 @@ go 1.23.0 use ./. -replace github.com/wasmCloud/west v0.2.0 => ./. +replace github.com/wasmCloud/wadge v0.2.0 => ./. diff --git a/include/west.h b/include/wadge.h similarity index 100% rename from include/west.h rename to include/wadge.h diff --git a/internal/generate/west.go b/internal/generate/wadge.go similarity index 78% rename from internal/generate/west.go rename to internal/generate/wadge.go index 019980f..d684694 100644 --- a/internal/generate/west.go +++ b/internal/generate/wadge.go @@ -48,27 +48,27 @@ func main() { )); err != nil { log.Fatalf("failed to generate WIT bindings: %s", err) } - if err := CargoBuild(CARGO_TARGET, "-p", "west-sys"); err != nil { + if err := CargoBuild(CARGO_TARGET, "-p", "wadge-sys"); err != nil { log.Fatalf("failed to build FFI: %s", err) } - libTarget := filepath.Join(LibTargetDir, "libwest.a") + libTarget := filepath.Join(LibTargetDir, "libwadge.a") if err := os.RemoveAll(libTarget); err != nil { log.Fatalf("failed to remove FFI: %s", err) } if err := os.Link( - filepath.Join(TargetPath(CARGO_TARGET), "libwest_sys.a"), + filepath.Join(TargetPath(CARGO_TARGET), "libwadge_sys.a"), libTarget, ); err != nil { log.Fatalf("failed to hard link FFI: %s", err) } - if err := CargoBuild("wasm32-unknown-unknown", "-p", "west-passthrough"); err != nil { + if err := CargoBuild("wasm32-unknown-unknown", "-p", "wadge-passthrough"); err != nil { log.Fatalf("failed to build passthrough component: %s", err) } if err := Run(exec.Command( "wasm-tools", "component", "new", - filepath.Join(TargetPath("wasm32-unknown-unknown"), "west_passthrough.wasm"), + filepath.Join(TargetPath("wasm32-unknown-unknown"), "wadge_passthrough.wasm"), "-o", filepath.Join(LibDir, "passthrough.wasm"), )); err != nil { diff --git a/internal/generate/west_android_arm64.go b/internal/generate/wadge_android_arm64.go similarity index 100% rename from internal/generate/west_android_arm64.go rename to internal/generate/wadge_android_arm64.go diff --git a/internal/generate/west_darwin_amd64.go b/internal/generate/wadge_darwin_amd64.go similarity index 100% rename from internal/generate/west_darwin_amd64.go rename to internal/generate/wadge_darwin_amd64.go diff --git a/internal/generate/west_darwin_arm64.go b/internal/generate/wadge_darwin_arm64.go similarity index 100% rename from internal/generate/west_darwin_arm64.go rename to internal/generate/wadge_darwin_arm64.go diff --git a/internal/generate/west_linux_amd64.go b/internal/generate/wadge_linux_amd64.go similarity index 100% rename from internal/generate/west_linux_amd64.go rename to internal/generate/wadge_linux_amd64.go diff --git a/internal/generate/west_linux_arm64.go b/internal/generate/wadge_linux_arm64.go similarity index 100% rename from internal/generate/west_linux_arm64.go rename to internal/generate/wadge_linux_arm64.go diff --git a/internal/generate/west_linux_riscv64.go b/internal/generate/wadge_linux_riscv64.go similarity index 100% rename from internal/generate/west_linux_riscv64.go rename to internal/generate/wadge_linux_riscv64.go diff --git a/internal/generate/west_windows_amd64.go b/internal/generate/wadge_windows_amd64.go similarity index 100% rename from internal/generate/west_windows_amd64.go rename to internal/generate/wadge_windows_amd64.go diff --git a/internal/generate/west_windows_arm64.go b/internal/generate/wadge_windows_arm64.go similarity index 100% rename from internal/generate/west_windows_arm64.go rename to internal/generate/wadge_windows_arm64.go diff --git a/src/lib.rs b/src/lib.rs index 5af754d..34528b1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -132,7 +132,7 @@ impl bindings::wasiext::http::ext::Host for Ctx { let uri = if let Some(authority) = authority { uri.authority(authority) } else { - uri.authority("west") + uri.authority("wadge") }; let uri = uri.build().context("failed to build URI")?; let mut req = http::Request::builder(); diff --git a/tests/components/sync/src/lib.rs b/tests/components/sync/src/lib.rs index da1b419..31f8c01 100644 --- a/tests/components/sync/src/lib.rs +++ b/tests/components/sync/src/lib.rs @@ -5,18 +5,18 @@ mod bindings { world: "host", path: "../../wit/sync", with: { - "west-test:sync/sync": generate, + "wadge-test:sync/sync": generate, } }); export!(Handler); } -use bindings::exports::west_test::sync::sync::{Abc, Foobar, Primitives, Rec, Var}; +use bindings::exports::wadge_test::sync::sync::{Abc, Foobar, Primitives, Rec, Var}; struct Handler; struct Res; -impl bindings::exports::west_test::sync::sync::GuestRes for Res { +impl bindings::exports::wadge_test::sync::sync::GuestRes for Res { fn new() -> Res { Res } @@ -25,18 +25,18 @@ impl bindings::exports::west_test::sync::sync::GuestRes for Res { "foo".into() } - fn make_list() -> Vec { + fn make_list() -> Vec { vec![ - bindings::exports::west_test::sync::sync::Res::new(Res), - bindings::exports::west_test::sync::sync::Res::new(Res), - bindings::exports::west_test::sync::sync::Res::new(Res), - bindings::exports::west_test::sync::sync::Res::new(Res), - bindings::exports::west_test::sync::sync::Res::new(Res), + bindings::exports::wadge_test::sync::sync::Res::new(Res), + bindings::exports::wadge_test::sync::sync::Res::new(Res), + bindings::exports::wadge_test::sync::sync::Res::new(Res), + bindings::exports::wadge_test::sync::sync::Res::new(Res), + bindings::exports::wadge_test::sync::sync::Res::new(Res), ] } } -impl bindings::exports::west_test::sync::sync::Guest for Handler { +impl bindings::exports::wadge_test::sync::sync::Guest for Handler { type Res = Res; fn identity_bool(arg: bool) -> bool { diff --git a/tests/components/wasi/src/lib.rs b/tests/components/wasi/src/lib.rs index 1c4d5dd..6e1fe0f 100644 --- a/tests/components/wasi/src/lib.rs +++ b/tests/components/wasi/src/lib.rs @@ -3,11 +3,11 @@ mod bindings { wit_bindgen::generate!({ with: { + "wadge-test:fib/fib": generate, + "wadge-test:leftpad/leftpad": generate, "wasi:io/error@0.2.1": wasi_passthrough::bindings::exports::wasi::io::error, "wasi:io/poll@0.2.1": wasi_passthrough::bindings::exports::wasi::io::poll, "wasi:io/streams@0.2.1": wasi_passthrough::bindings::exports::wasi::io::streams, - "west-test:fib/fib": generate, - "west-test:leftpad/leftpad": generate, } }); export!(Handler); @@ -20,7 +20,7 @@ use wasi_passthrough_ext as _; pub struct Handler; -impl bindings::exports::west_test::fib::fib::Guest for Handler { +impl bindings::exports::wadge_test::fib::fib::Guest for Handler { fn fib(n: u32) -> u64 { match n { 0 => 0, @@ -30,7 +30,7 @@ impl bindings::exports::west_test::fib::fib::Guest for Handler { } } -impl bindings::exports::west_test::leftpad::leftpad::Guest for Handler { +impl bindings::exports::wadge_test::leftpad::leftpad::Guest for Handler { fn leftpad( in_: wasi_passthrough::bindings::exports::wasi::io::streams::InputStream, out: wasi_passthrough::bindings::exports::wasi::io::streams::OutputStreamBorrow<'_>, diff --git a/tests/components/wasi/wit/harness.wit b/tests/components/wasi/wit/harness.wit index 9af9a45..c4f2258 100644 --- a/tests/components/wasi/wit/harness.wit +++ b/tests/components/wasi/wit/harness.wit @@ -1,8 +1,8 @@ -package west-test:wasi; +package wadge-test:wasi; world harness { - include west-test:fib/host; - include west-test:leftpad/host; + include wadge-test:fib/host; + include wadge-test:leftpad/host; export wasi:io/error@0.2.1; export wasi:io/poll@0.2.1; diff --git a/tests/go/sync/bindings/west-test/sync/guest/guest.wit.go b/tests/go/sync/bindings/wadge-test/sync/guest/guest.wit.go similarity index 50% rename from tests/go/sync/bindings/west-test/sync/guest/guest.wit.go rename to tests/go/sync/bindings/wadge-test/sync/guest/guest.wit.go index eaa24d5..d91d734 100644 --- a/tests/go/sync/bindings/west-test/sync/guest/guest.wit.go +++ b/tests/go/sync/bindings/wadge-test/sync/guest/guest.wit.go @@ -1,4 +1,4 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package guest represents the world "west-test:sync/guest". +// Package guest represents the world "wadge-test:sync/guest". package guest diff --git a/tests/go/sync/bindings/west-test/sync/sync/abi.go b/tests/go/sync/bindings/wadge-test/sync/sync/abi.go similarity index 100% rename from tests/go/sync/bindings/west-test/sync/sync/abi.go rename to tests/go/sync/bindings/wadge-test/sync/sync/abi.go diff --git a/tests/go/sync/bindings/west-test/sync/sync/empty.s b/tests/go/sync/bindings/wadge-test/sync/sync/empty.s similarity index 100% rename from tests/go/sync/bindings/west-test/sync/sync/empty.s rename to tests/go/sync/bindings/wadge-test/sync/sync/empty.s diff --git a/tests/go/sync/bindings/west-test/sync/sync/sync.wit.go b/tests/go/sync/bindings/wadge-test/sync/sync/sync.wit.go similarity index 88% rename from tests/go/sync/bindings/west-test/sync/sync/sync.wit.go rename to tests/go/sync/bindings/wadge-test/sync/sync/sync.wit.go index 121ccf9..034c521 100644 --- a/tests/go/sync/bindings/west-test/sync/sync/sync.wit.go +++ b/tests/go/sync/bindings/wadge-test/sync/sync/sync.wit.go @@ -1,13 +1,13 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package sync represents the imported interface "west-test:sync/sync". +// Package sync represents the imported interface "wadge-test:sync/sync". package sync import ( "github.com/bytecodealliance/wasm-tools-go/cm" ) -// Abc represents the flags "west-test:sync/sync#abc". +// Abc represents the flags "wadge-test:sync/sync#abc". // // flags abc { // a, @@ -22,7 +22,7 @@ const ( AbcC ) -// RecNested represents the record "west-test:sync/sync#rec-nested". +// RecNested represents the record "wadge-test:sync/sync#rec-nested". // // record rec-nested { // foo: string, @@ -31,7 +31,7 @@ type RecNested struct { Foo string } -// Rec represents the record "west-test:sync/sync#rec". +// Rec represents the record "wadge-test:sync/sync#rec". // // record rec { // nested: rec-nested, @@ -40,7 +40,7 @@ type Rec struct { Nested RecNested } -// Var represents the variant "west-test:sync/sync#var". +// Var represents the variant "wadge-test:sync/sync#var". // // variant var { // var(rec), @@ -69,7 +69,7 @@ func (self *Var) Empty() bool { return self.Tag() == 1 } -// Foobar represents the enum "west-test:sync/sync#foobar". +// Foobar represents the enum "wadge-test:sync/sync#foobar". // // enum foobar { // foo, @@ -92,7 +92,7 @@ func (e Foobar) String() string { return stringsFoobar[e] } -// Primitives represents the record "west-test:sync/sync#primitives". +// Primitives represents the record "wadge-test:sync/sync#primitives". // // record primitives { // a: u8, @@ -125,7 +125,7 @@ type Primitives struct { M string } -// Res represents the imported resource "west-test:sync/sync#res". +// Res represents the imported resource "wadge-test:sync/sync#res". // // resource res type Res cm.Resource @@ -141,7 +141,7 @@ func (self Res) ResourceDrop() { return } -//go:wasmimport west-test:sync/sync [resource-drop]res +//go:wasmimport wadge-test:sync/sync [resource-drop]res //go:noescape func wasmimport_ResResourceDrop(self0 uint32) @@ -156,7 +156,7 @@ func NewRes() (result Res) { return } -//go:wasmimport west-test:sync/sync [constructor]res +//go:wasmimport wadge-test:sync/sync [constructor]res //go:noescape func wasmimport_NewRes() (result0 uint32) @@ -170,7 +170,7 @@ func ResMakeList() (result cm.List[Res]) { return } -//go:wasmimport west-test:sync/sync [static]res.make-list +//go:wasmimport wadge-test:sync/sync [static]res.make-list //go:noescape func wasmimport_ResMakeList(result *cm.List[Res]) @@ -185,7 +185,7 @@ func (self Res) Foo() (result string) { return } -//go:wasmimport west-test:sync/sync [method]res.foo +//go:wasmimport wadge-test:sync/sync [method]res.foo //go:noescape func wasmimport_ResFoo(self0 uint32, result *string) @@ -201,7 +201,7 @@ func IdentityBool(arg bool) (result bool) { return } -//go:wasmimport west-test:sync/sync identity-bool +//go:wasmimport wadge-test:sync/sync identity-bool //go:noescape func wasmimport_IdentityBool(arg0 uint32) (result0 uint32) @@ -217,7 +217,7 @@ func IdentityS8(arg int8) (result int8) { return } -//go:wasmimport west-test:sync/sync identity-s8 +//go:wasmimport wadge-test:sync/sync identity-s8 //go:noescape func wasmimport_IdentityS8(arg0 uint32) (result0 uint32) @@ -233,7 +233,7 @@ func IdentityU8(arg uint8) (result uint8) { return } -//go:wasmimport west-test:sync/sync identity-u8 +//go:wasmimport wadge-test:sync/sync identity-u8 //go:noescape func wasmimport_IdentityU8(arg0 uint32) (result0 uint32) @@ -249,7 +249,7 @@ func IdentityS16(arg int16) (result int16) { return } -//go:wasmimport west-test:sync/sync identity-s16 +//go:wasmimport wadge-test:sync/sync identity-s16 //go:noescape func wasmimport_IdentityS16(arg0 uint32) (result0 uint32) @@ -265,7 +265,7 @@ func IdentityU16(arg uint16) (result uint16) { return } -//go:wasmimport west-test:sync/sync identity-u16 +//go:wasmimport wadge-test:sync/sync identity-u16 //go:noescape func wasmimport_IdentityU16(arg0 uint32) (result0 uint32) @@ -281,7 +281,7 @@ func IdentityS32(arg int32) (result int32) { return } -//go:wasmimport west-test:sync/sync identity-s32 +//go:wasmimport wadge-test:sync/sync identity-s32 //go:noescape func wasmimport_IdentityS32(arg0 uint32) (result0 uint32) @@ -297,7 +297,7 @@ func IdentityU32(arg uint32) (result uint32) { return } -//go:wasmimport west-test:sync/sync identity-u32 +//go:wasmimport wadge-test:sync/sync identity-u32 //go:noescape func wasmimport_IdentityU32(arg0 uint32) (result0 uint32) @@ -313,7 +313,7 @@ func IdentityS64(arg int64) (result int64) { return } -//go:wasmimport west-test:sync/sync identity-s64 +//go:wasmimport wadge-test:sync/sync identity-s64 //go:noescape func wasmimport_IdentityS64(arg0 uint64) (result0 uint64) @@ -329,7 +329,7 @@ func IdentityU64(arg uint64) (result uint64) { return } -//go:wasmimport west-test:sync/sync identity-u64 +//go:wasmimport wadge-test:sync/sync identity-u64 //go:noescape func wasmimport_IdentityU64(arg0 uint64) (result0 uint64) @@ -345,7 +345,7 @@ func IdentityF32(arg float32) (result float32) { return } -//go:wasmimport west-test:sync/sync identity-f32 +//go:wasmimport wadge-test:sync/sync identity-f32 //go:noescape func wasmimport_IdentityF32(arg0 float32) (result0 float32) @@ -361,7 +361,7 @@ func IdentityF64(arg float64) (result float64) { return } -//go:wasmimport west-test:sync/sync identity-f64 +//go:wasmimport wadge-test:sync/sync identity-f64 //go:noescape func wasmimport_IdentityF64(arg0 float64) (result0 float64) @@ -377,7 +377,7 @@ func IdentityChar(arg rune) (result rune) { return } -//go:wasmimport west-test:sync/sync identity-char +//go:wasmimport wadge-test:sync/sync identity-char //go:noescape func wasmimport_IdentityChar(arg0 uint32) (result0 uint32) @@ -392,7 +392,7 @@ func IdentityString(arg string) (result string) { return } -//go:wasmimport west-test:sync/sync identity-string +//go:wasmimport wadge-test:sync/sync identity-string //go:noescape func wasmimport_IdentityString(arg0 *uint8, arg1 uint32, result *string) @@ -408,7 +408,7 @@ func IdentityFlags(arg Abc) (result Abc) { return } -//go:wasmimport west-test:sync/sync identity-flags +//go:wasmimport wadge-test:sync/sync identity-flags //go:noescape func wasmimport_IdentityFlags(arg0 uint32) (result0 uint32) @@ -424,7 +424,7 @@ func IdentityEnum(arg Foobar) (result Foobar) { return } -//go:wasmimport west-test:sync/sync identity-enum +//go:wasmimport wadge-test:sync/sync identity-enum //go:noescape func wasmimport_IdentityEnum(arg0 uint32) (result0 uint32) @@ -439,7 +439,7 @@ func IdentityVariant(arg Var) (result Var) { return } -//go:wasmimport west-test:sync/sync identity-variant +//go:wasmimport wadge-test:sync/sync identity-variant //go:noescape func wasmimport_IdentityVariant(arg0 uint32, arg1 *uint8, arg2 uint32, result *Var) @@ -454,7 +454,7 @@ func IdentityOptionString(arg cm.Option[string]) (result cm.Option[string]) { return } -//go:wasmimport west-test:sync/sync identity-option-string +//go:wasmimport wadge-test:sync/sync identity-option-string //go:noescape func wasmimport_IdentityOptionString(arg0 uint32, arg1 *uint8, arg2 uint32, result *cm.Option[string]) @@ -469,7 +469,7 @@ func IdentityResultString(arg cm.Result[string, string, struct{}]) (result cm.Re return } -//go:wasmimport west-test:sync/sync identity-result-string +//go:wasmimport wadge-test:sync/sync identity-result-string //go:noescape func wasmimport_IdentityResultString(arg0 uint32, arg1 *uint8, arg2 uint32, result *cm.Result[string, string, struct{}]) @@ -484,7 +484,7 @@ func IdentityRecordPrimitives(arg Primitives) (result Primitives) { return } -//go:wasmimport west-test:sync/sync identity-record-primitives +//go:wasmimport wadge-test:sync/sync identity-record-primitives //go:noescape func wasmimport_IdentityRecordPrimitives(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint64, arg4 uint32, arg5 uint32, arg6 uint32, arg7 uint64, arg8 float32, arg9 float64, arg10 uint32, arg11 uint32, arg12 *uint8, arg13 uint32, result *Primitives) @@ -499,7 +499,7 @@ func IdentityRecordRec(arg Rec) (result Rec) { return } -//go:wasmimport west-test:sync/sync identity-record-rec +//go:wasmimport wadge-test:sync/sync identity-record-rec //go:noescape func wasmimport_IdentityRecordRec(arg0 *uint8, arg1 uint32, result *Rec) @@ -516,7 +516,7 @@ func IdentityTuple(arg cm.Tuple13[uint8, uint16, uint32, uint64, int8, int16, in return } -//go:wasmimport west-test:sync/sync identity-tuple +//go:wasmimport wadge-test:sync/sync identity-tuple //go:noescape func wasmimport_IdentityTuple(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint64, arg4 uint32, arg5 uint32, arg6 uint32, arg7 uint64, arg8 float32, arg9 float64, arg10 uint32, arg11 uint32, arg12 *uint8, arg13 uint32, result *cm.Tuple13[uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, float64, bool, rune, string]) @@ -531,7 +531,7 @@ func IdentityListBool(arg cm.List[bool]) (result cm.List[bool]) { return } -//go:wasmimport west-test:sync/sync identity-list-bool +//go:wasmimport wadge-test:sync/sync identity-list-bool //go:noescape func wasmimport_IdentityListBool(arg0 *bool, arg1 uint32, result *cm.List[bool]) @@ -546,7 +546,7 @@ func IdentityListU16(arg cm.List[uint16]) (result cm.List[uint16]) { return } -//go:wasmimport west-test:sync/sync identity-list-u16 +//go:wasmimport wadge-test:sync/sync identity-list-u16 //go:noescape func wasmimport_IdentityListU16(arg0 *uint16, arg1 uint32, result *cm.List[uint16]) @@ -561,7 +561,7 @@ func IdentityListString(arg cm.List[string]) (result cm.List[string]) { return } -//go:wasmimport west-test:sync/sync identity-list-string +//go:wasmimport wadge-test:sync/sync identity-list-string //go:noescape func wasmimport_IdentityListString(arg0 *string, arg1 uint32, result *cm.List[string]) @@ -576,7 +576,7 @@ func IdentityListEnum(arg cm.List[Foobar]) (result cm.List[Foobar]) { return } -//go:wasmimport west-test:sync/sync identity-list-enum +//go:wasmimport wadge-test:sync/sync identity-list-enum //go:noescape func wasmimport_IdentityListEnum(arg0 *Foobar, arg1 uint32, result *cm.List[Foobar]) @@ -591,7 +591,7 @@ func IdentityListFlags(arg cm.List[Abc]) (result cm.List[Abc]) { return } -//go:wasmimport west-test:sync/sync identity-list-flags +//go:wasmimport wadge-test:sync/sync identity-list-flags //go:noescape func wasmimport_IdentityListFlags(arg0 *Abc, arg1 uint32, result *cm.List[Abc]) @@ -606,7 +606,7 @@ func IdentityListRecordPrimitives(arg cm.List[Primitives]) (result cm.List[Primi return } -//go:wasmimport west-test:sync/sync identity-list-record-primitives +//go:wasmimport wadge-test:sync/sync identity-list-record-primitives //go:noescape func wasmimport_IdentityListRecordPrimitives(arg0 *Primitives, arg1 uint32, result *cm.List[Primitives]) @@ -621,7 +621,7 @@ func IdentityListVariant(arg cm.List[Var]) (result cm.List[Var]) { return } -//go:wasmimport west-test:sync/sync identity-list-variant +//go:wasmimport wadge-test:sync/sync identity-list-variant //go:noescape func wasmimport_IdentityListVariant(arg0 *Var, arg1 uint32, result *cm.List[Var]) @@ -636,7 +636,7 @@ func IdentityListOptionString(arg cm.List[cm.Option[string]]) (result cm.List[cm return } -//go:wasmimport west-test:sync/sync identity-list-option-string +//go:wasmimport wadge-test:sync/sync identity-list-option-string //go:noescape func wasmimport_IdentityListOptionString(arg0 *cm.Option[string], arg1 uint32, result *cm.List[cm.Option[string]]) @@ -651,7 +651,7 @@ func IdentityListResultString(arg cm.List[cm.Result[string, string, struct{}]]) return } -//go:wasmimport west-test:sync/sync identity-list-result-string +//go:wasmimport wadge-test:sync/sync identity-list-result-string //go:noescape func wasmimport_IdentityListResultString(arg0 *cm.Result[string, string, struct{}], arg1 uint32, result *cm.List[cm.Result[string, string, struct{}]]) @@ -666,7 +666,7 @@ func IdentityListListString(arg cm.List[cm.List[string]]) (result cm.List[cm.Lis return } -//go:wasmimport west-test:sync/sync identity-list-list-string +//go:wasmimport wadge-test:sync/sync identity-list-list-string //go:noescape func wasmimport_IdentityListListString(arg0 *cm.List[string], arg1 uint32, result *cm.List[cm.List[string]]) @@ -695,6 +695,6 @@ func IdentityPrimitives(a uint8, b uint16, c uint32, d uint64, e int8, f int16, return } -//go:wasmimport west-test:sync/sync identity-primitives +//go:wasmimport wadge-test:sync/sync identity-primitives //go:noescape func wasmimport_IdentityPrimitives(a0 uint32, b0 uint32, c0 uint32, d0 uint64, e0 uint32, f0 uint32, g0 uint32, h0 uint64, i0 float32, j0 float64, k0 uint32, l0 uint32, m0 *uint8, m1 uint32, result *cm.Tuple13[uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, float64, bool, rune, string]) diff --git a/tests/go/sync/sync.go b/tests/go/sync/sync.go index 7c3e966..8cd8162 100644 --- a/tests/go/sync/sync.go +++ b/tests/go/sync/sync.go @@ -3,5 +3,5 @@ package sync import ( - _ "github.com/wasmCloud/west/tests/go/sync/bindings/west-test/sync/sync" + _ "github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync" ) diff --git a/tests/go/sync/sync_test.go b/tests/go/sync/sync_test.go index 4b72bdc..fc3d587 100644 --- a/tests/go/sync/sync_test.go +++ b/tests/go/sync/sync_test.go @@ -1,4 +1,4 @@ -//go:generate go run github.com/wasmCloud/west/cmd/west-bindgen-go +//go:generate go run github.com/wasmCloud/wadge/cmd/wadge-bindgen-go //go:generate cargo build -p sync-test-component --target wasm32-unknown-unknown //go:generate cp ../../../target/wasm32-unknown-unknown/debug/sync_test_component.wasm component.wasm @@ -14,8 +14,8 @@ import ( "github.com/bytecodealliance/wasm-tools-go/cm" "github.com/stretchr/testify/assert" - "github.com/wasmCloud/west" - "github.com/wasmCloud/west/tests/go/sync/bindings/west-test/sync/sync" + "github.com/wasmCloud/wadge" + "github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync" ) //go:embed component.wasm @@ -32,17 +32,17 @@ func init() { }, }))) - instance, err := west.NewInstance(&west.Config{ + instance, err := wadge.NewInstance(&wadge.Config{ Wasm: component, }) if err != nil { log.Fatalf("failed to construct new instance: %s", err) } - west.SetInstance(instance) + wadge.SetInstance(instance) } func TestIdentityBool(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, true, sync.IdentityBool(true), ) @@ -50,7 +50,7 @@ func TestIdentityBool(t *testing.T) { } func TestIdentityU8(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, uint8(42), sync.IdentityU8(42), ) @@ -58,7 +58,7 @@ func TestIdentityU8(t *testing.T) { } func TestIdentityU16(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, uint16(42), sync.IdentityU16(42), ) @@ -66,7 +66,7 @@ func TestIdentityU16(t *testing.T) { } func TestIdentityU32(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, uint32(42), sync.IdentityU32(42), ) @@ -74,7 +74,7 @@ func TestIdentityU32(t *testing.T) { } func TestIdentityU64(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, uint64(42), sync.IdentityU64(42), ) @@ -82,7 +82,7 @@ func TestIdentityU64(t *testing.T) { } func TestIdentityS8(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, int8(-42), sync.IdentityS8(-42), ) @@ -90,7 +90,7 @@ func TestIdentityS8(t *testing.T) { } func TestIdentityS16(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, int16(-42), sync.IdentityS16(-42), ) @@ -98,7 +98,7 @@ func TestIdentityS16(t *testing.T) { } func TestIdentityS32(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, int32(-42), sync.IdentityS32(-42), ) @@ -106,7 +106,7 @@ func TestIdentityS32(t *testing.T) { } func TestIdentityS64(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, int64(-42), sync.IdentityS64(-42), ) @@ -114,7 +114,7 @@ func TestIdentityS64(t *testing.T) { } func TestIdentityF32(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, float32(-42.42), sync.IdentityF32(-42.42), ) @@ -122,7 +122,7 @@ func TestIdentityF32(t *testing.T) { } func TestIdentityF64(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, float64(-42.42), sync.IdentityF64(-42.42), ) @@ -130,7 +130,7 @@ func TestIdentityF64(t *testing.T) { } func TestIdentityChar(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, '🤡', sync.IdentityChar('🤡'), ) @@ -139,14 +139,14 @@ func TestIdentityChar(t *testing.T) { func TestIdentityString(t *testing.T) { t.Run("empty", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, "", sync.IdentityString(""), ) }) }) t.Run("foo", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, "foo", sync.IdentityString("foo"), ) @@ -156,28 +156,28 @@ func TestIdentityString(t *testing.T) { func TestIdentityFlags(t *testing.T) { t.Run("a", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.AbcA, sync.IdentityFlags(sync.AbcA), ) }) }) t.Run("c", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.AbcC, sync.IdentityFlags(sync.AbcC), ) }) }) t.Run("a|c", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.AbcA|sync.AbcC, sync.IdentityFlags(sync.AbcA|sync.AbcC), ) }) }) t.Run("a|b|c", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.AbcA|sync.AbcB|sync.AbcC, sync.IdentityFlags(sync.AbcA|sync.AbcB|sync.AbcC), ) @@ -187,14 +187,14 @@ func TestIdentityFlags(t *testing.T) { func TestIdentityEnum(t *testing.T) { t.Run("foo", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.FoobarFoo, sync.IdentityEnum(sync.FoobarFoo), ) }) }) t.Run("bar", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.FoobarBar, sync.IdentityEnum(sync.FoobarBar), ) @@ -204,7 +204,7 @@ func TestIdentityEnum(t *testing.T) { func TestIdentityVariant(t *testing.T) { t.Run("empty", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.VarEmpty(), sync.IdentityVariant(sync.VarEmpty()), ) @@ -212,7 +212,7 @@ func TestIdentityVariant(t *testing.T) { }) t.Run("var", func(t *testing.T) { t.Run("empty", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := sync.VarVar(sync.Rec{}) assert.Equal(t, expected, sync.IdentityVariant(expected), @@ -220,7 +220,7 @@ func TestIdentityVariant(t *testing.T) { }) }) t.Run("foo", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := sync.VarVar(sync.Rec{ Nested: sync.RecNested{ Foo: "foo", @@ -236,7 +236,7 @@ func TestIdentityVariant(t *testing.T) { func TestIdentityOptionString(t *testing.T) { t.Run("none", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.None[string]() assert.Equal(t, expected, sync.IdentityOptionString(expected), @@ -244,7 +244,7 @@ func TestIdentityOptionString(t *testing.T) { }) }) t.Run("some('')", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.Some("") assert.Equal(t, expected, sync.IdentityOptionString(expected), @@ -252,7 +252,7 @@ func TestIdentityOptionString(t *testing.T) { }) }) t.Run("some(foo)", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.Some("foo") assert.Equal(t, expected, sync.IdentityOptionString(expected), @@ -260,7 +260,7 @@ func TestIdentityOptionString(t *testing.T) { }) }) t.Run("some(foobar)", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.Some("foobar") assert.Equal(t, expected, sync.IdentityOptionString(expected), @@ -271,7 +271,7 @@ func TestIdentityOptionString(t *testing.T) { func TestIdentityResultString(t *testing.T) { t.Run("ok('')", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.OK[cm.Result[string, string, struct{}]]("") assert.Equal(t, expected, sync.IdentityResultString(expected), @@ -279,7 +279,7 @@ func TestIdentityResultString(t *testing.T) { }) }) t.Run("ok(foo)", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.OK[cm.Result[string, string, struct{}]]("foo") assert.Equal(t, expected, sync.IdentityResultString(expected), @@ -287,7 +287,7 @@ func TestIdentityResultString(t *testing.T) { }) }) t.Run("err", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.Err[cm.Result[string, string, struct{}]](struct{}{}) assert.Equal(t, expected, sync.IdentityResultString(expected), @@ -297,7 +297,7 @@ func TestIdentityResultString(t *testing.T) { } func TestIdentityRecordPrimitives(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := sync.Primitives{ A: 1, B: 2, C: 3, D: 4, E: 5, F: 6, G: 7, H: 8, I: 9, J: 10, K: true, L: '🤡', M: "test", } @@ -309,7 +309,7 @@ func TestIdentityRecordPrimitives(t *testing.T) { func TestIdentityRecordRec(t *testing.T) { t.Run("empty", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := sync.Rec{} assert.Equal(t, expected, sync.IdentityRecordRec(expected), @@ -317,7 +317,7 @@ func TestIdentityRecordRec(t *testing.T) { }) }) t.Run("foo", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := sync.Rec{ Nested: sync.RecNested{ Foo: "foo", @@ -331,7 +331,7 @@ func TestIdentityRecordRec(t *testing.T) { } func TestIdentityTuple(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := cm.Tuple13[uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, float64, bool, rune, string]{ F0: 1, F1: 2, F2: 3, F3: 4, F4: 5, F5: 6, F6: 7, F7: 8, F8: 9, F9: 10, F10: true, F11: '🤡', F12: "test", } @@ -344,14 +344,14 @@ func TestIdentityTuple(t *testing.T) { func TestIdentityListBool(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []bool(nil), sync.IdentityListBool(cm.NewList[bool](nil, 0)).Slice(), ) }) }) t.Run("[true false true]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []bool{true, false, true} assert.Equal(t, expected, sync.IdentityListBool(cm.NewList(unsafe.SliceData(expected), 3)).Slice(), @@ -362,14 +362,14 @@ func TestIdentityListBool(t *testing.T) { func TestIdentityListU16(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []uint16(nil), sync.IdentityListU16(cm.NewList[uint16](nil, 0)).Slice(), ) }) }) t.Run("[1 2 3 4]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []uint16{1, 2, 3, 4} assert.Equal(t, expected, sync.IdentityListU16(cm.NewList(unsafe.SliceData(expected), 4)).Slice(), @@ -380,14 +380,14 @@ func TestIdentityListU16(t *testing.T) { func TestIdentityListString(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []string(nil), sync.IdentityListString(cm.NewList[string](nil, 0)).Slice(), ) }) }) t.Run("[foo bar baz]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []string{"foo", "bar", "baz"} assert.Equal(t, expected, sync.IdentityListString(cm.NewList(unsafe.SliceData(expected), 3)).Slice(), @@ -398,14 +398,14 @@ func TestIdentityListString(t *testing.T) { func TestIdentityListEnum(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []sync.Foobar(nil), sync.IdentityListEnum(cm.NewList[sync.Foobar](nil, 0)).Slice(), ) }) }) t.Run("[foo]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Foobar{sync.FoobarFoo} assert.Equal(t, expected, sync.IdentityListEnum(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -413,7 +413,7 @@ func TestIdentityListEnum(t *testing.T) { }) }) t.Run("[foo bar foo]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Foobar{sync.FoobarFoo, sync.FoobarBar, sync.FoobarFoo} assert.Equal(t, expected, sync.IdentityListEnum(cm.NewList(unsafe.SliceData(expected), 3)).Slice(), @@ -424,14 +424,14 @@ func TestIdentityListEnum(t *testing.T) { func TestIdentityListFlags(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []sync.Abc(nil), sync.IdentityListFlags(cm.NewList[sync.Abc](nil, 0)).Slice(), ) }) }) t.Run("[a]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Abc{sync.AbcA} assert.Equal(t, expected, sync.IdentityListFlags(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -439,7 +439,7 @@ func TestIdentityListFlags(t *testing.T) { }) }) t.Run("[b]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Abc{sync.AbcB} assert.Equal(t, expected, sync.IdentityListFlags(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -447,7 +447,7 @@ func TestIdentityListFlags(t *testing.T) { }) }) t.Run("[a|b]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Abc{sync.AbcA | sync.AbcB} assert.Equal(t, expected, sync.IdentityListFlags(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -455,7 +455,7 @@ func TestIdentityListFlags(t *testing.T) { }) }) t.Run("[a a]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Abc{sync.AbcA, sync.AbcA} assert.Equal(t, expected, sync.IdentityListFlags(cm.NewList(unsafe.SliceData(expected), 2)).Slice(), @@ -463,7 +463,7 @@ func TestIdentityListFlags(t *testing.T) { }) }) t.Run("[a a|c a|b|c]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Abc{sync.AbcA, sync.AbcA | sync.AbcC, sync.AbcA | sync.AbcB | sync.AbcC} assert.Equal(t, expected, sync.IdentityListFlags(cm.NewList(unsafe.SliceData(expected), 3)).Slice(), @@ -474,14 +474,14 @@ func TestIdentityListFlags(t *testing.T) { func TestIdentityListRecordPrimitives(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []sync.Primitives(nil), sync.IdentityListRecordPrimitives(cm.NewList[sync.Primitives](nil, 0)).Slice(), ) }) }) t.Run("1", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Primitives{ { A: 1, B: 2, C: 3, D: 4, E: 5, F: 6, G: 7, H: 8, I: 9, J: 10, K: true, L: '🤡', M: "test", @@ -493,7 +493,7 @@ func TestIdentityListRecordPrimitives(t *testing.T) { }) }) t.Run("3", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Primitives{ { A: 1, B: 2, C: 3, D: 4, E: 5, F: 6, G: 7, H: 8, I: 9, J: 10, K: true, L: '🤡', M: "test", @@ -512,14 +512,14 @@ func TestIdentityListRecordPrimitives(t *testing.T) { func TestIdentityListVariant(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []sync.Var(nil), sync.IdentityListVariant(cm.NewList[sync.Var](nil, 0)).Slice(), ) }) }) t.Run("[empty]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Var{sync.VarEmpty()} assert.Equal(t, expected, sync.IdentityListVariant(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -527,7 +527,7 @@ func TestIdentityListVariant(t *testing.T) { }) }) t.Run("[var(empty)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Var{sync.VarVar(sync.Rec{})} assert.Equal(t, expected, sync.IdentityListVariant(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -535,7 +535,7 @@ func TestIdentityListVariant(t *testing.T) { }) }) t.Run("[var(foo)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Var{sync.VarVar(sync.Rec{ Nested: sync.RecNested{ Foo: "foo", @@ -547,7 +547,7 @@ func TestIdentityListVariant(t *testing.T) { }) }) t.Run("[var(foo), empty]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Var{ sync.VarVar(sync.Rec{ Nested: sync.RecNested{ @@ -562,7 +562,7 @@ func TestIdentityListVariant(t *testing.T) { }) }) t.Run("[var(foo), empty, var(bar), var(empty), var(baz)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []sync.Var{ sync.VarVar(sync.Rec{ Nested: sync.RecNested{ @@ -591,14 +591,14 @@ func TestIdentityListVariant(t *testing.T) { func TestIdentityListOptionString(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []cm.Option[string](nil), sync.IdentityListOptionString(cm.NewList[cm.Option[string]](nil, 0)).Slice(), ) }) }) t.Run("[none]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{cm.None[string]()} assert.Equal(t, expected, sync.IdentityListOptionString(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -606,7 +606,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[some(foo)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{cm.Some("foo")} assert.Equal(t, expected, sync.IdentityListOptionString(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -614,7 +614,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[some(foo) some(bar)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{ cm.Some("foo"), cm.Some("bar"), @@ -625,7 +625,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[none none]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{ cm.None[string](), cm.None[string](), @@ -636,7 +636,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[some(foobar) none]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{ cm.Some("foo"), cm.None[string](), @@ -647,7 +647,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[none some(foo)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{ cm.None[string](), cm.Some("foo"), @@ -658,7 +658,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[none none none]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{ cm.None[string](), cm.None[string](), @@ -670,7 +670,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[none some(foo) some('') none]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{ cm.None[string](), cm.Some("foo"), @@ -683,7 +683,7 @@ func TestIdentityListOptionString(t *testing.T) { }) }) t.Run("[none some(foo) some('') none some(bar) some(baz) none some('')]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Option[string]{ cm.None[string](), cm.Some("foo"), @@ -703,14 +703,14 @@ func TestIdentityListOptionString(t *testing.T) { func TestIdentityListResultString(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []cm.Result[string, string, struct{}](nil), sync.IdentityListResultString(cm.NewList[cm.Result[string, string, struct{}]](nil, 0)).Slice(), ) }) }) t.Run("[err]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Result[string, string, struct{}]{cm.Err[cm.Result[string, string, struct{}]](struct{}{})} assert.Equal(t, expected, sync.IdentityListResultString(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -718,7 +718,7 @@ func TestIdentityListResultString(t *testing.T) { }) }) t.Run("[ok(foo)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Result[string, string, struct{}]{cm.OK[cm.Result[string, string, struct{}]]("foo")} assert.Equal(t, expected, sync.IdentityListResultString(cm.NewList(unsafe.SliceData(expected), 1)).Slice(), @@ -726,7 +726,7 @@ func TestIdentityListResultString(t *testing.T) { }) }) t.Run("[ok(foo) ok(bar)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Result[string, string, struct{}]{ cm.OK[cm.Result[string, string, struct{}]]("foo"), cm.OK[cm.Result[string, string, struct{}]]("bar"), @@ -737,7 +737,7 @@ func TestIdentityListResultString(t *testing.T) { }) }) t.Run("[ok(foo) ok(bar) err]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Result[string, string, struct{}]{ cm.OK[cm.Result[string, string, struct{}]]("foo"), cm.OK[cm.Result[string, string, struct{}]]("bar"), @@ -749,7 +749,7 @@ func TestIdentityListResultString(t *testing.T) { }) }) t.Run("[ok(foo) ok(bar) err ok() ok() err ok(baz)]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.Result[string, string, struct{}]{ cm.OK[cm.Result[string, string, struct{}]]("foo"), cm.OK[cm.Result[string, string, struct{}]]("bar"), @@ -768,14 +768,14 @@ func TestIdentityListResultString(t *testing.T) { func TestIdentityListListString(t *testing.T) { t.Run("[]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, []cm.List[string](nil), sync.IdentityListListString(cm.NewList[cm.List[string]](nil, 0)).Slice(), ) }) }) t.Run("[[foo bar][baz]]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.List[string]{ cm.NewList( unsafe.SliceData([]string{"foo", "bar"}), @@ -792,7 +792,7 @@ func TestIdentityListListString(t *testing.T) { }) }) t.Run("[[foo '' bar][]['']]", func(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { expected := []cm.List[string]{ cm.NewList( unsafe.SliceData([]string{"foo", "", "bar"}), @@ -815,7 +815,7 @@ func TestIdentityListListString(t *testing.T) { } func TestIdentityPrimitives(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { assert.Equal(t, sync.IdentityPrimitives(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, true, '🤡', "test"), cm.Tuple13[uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, float64, bool, rune, string]{ @@ -825,7 +825,7 @@ func TestIdentityPrimitives(t *testing.T) { } func TestRes(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { res := sync.NewRes() assert.Equal(t, res.Foo(), "foo") assert.Equal(t, res.Foo(), "foo") diff --git a/tests/go/sync/wadge_bindings_test.go b/tests/go/sync/wadge_bindings_test.go new file mode 100644 index 0000000..00296f7 --- /dev/null +++ b/tests/go/sync/wadge_bindings_test.go @@ -0,0 +1,951 @@ +// Code generated by wadge-bindgen-go DO NOT EDIT + +package sync_test + +import ( + github_com__bytecodealliance__wasm___tools___go__cm "github.com/bytecodealliance/wasm-tools-go/cm" + wadge "github.com/wasmCloud/wadge" + github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync "github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync" + "runtime" + "unsafe" +) + +const _ string = runtime.Compiler + +var _ unsafe.Pointer + +//go:linkname wasmimport_NewRes github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_NewRes +func wasmimport_NewRes() (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "[constructor]res", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ResFoo github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_ResFoo +func wasmimport_ResFoo(self0 uint32, result *string) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "[method]res.foo", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ResResourceDrop github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_ResResourceDrop +func wasmimport_ResResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "[resource-drop]res", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ResMakeList github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_ResMakeList +func wasmimport_ResMakeList(result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Res]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "[static]res.make-list", func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityBool github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityBool +func wasmimport_IdentityBool(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-bool", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityChar github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityChar +func wasmimport_IdentityChar(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-char", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityEnum github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityEnum +func wasmimport_IdentityEnum(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-enum", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityF32 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityF32 +func wasmimport_IdentityF32(arg0 float32) (result0 float32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-f32", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityF64 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityF64 +func wasmimport_IdentityF64(arg0 float64) (result0 float64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-f64", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityFlags github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityFlags +func wasmimport_IdentityFlags(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-flags", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListBool github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListBool +func wasmimport_IdentityListBool(arg0 *bool, arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[bool]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-bool", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListEnum github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListEnum +func wasmimport_IdentityListEnum(arg0 *github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Foobar, arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Foobar]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-enum", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListFlags github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListFlags +func wasmimport_IdentityListFlags(arg0 *github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Abc, arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Abc]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-flags", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListListString github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListListString +func wasmimport_IdentityListListString(arg0 *github_com__bytecodealliance__wasm___tools___go__cm.List[string], arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__bytecodealliance__wasm___tools___go__cm.List[string]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-list-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListOptionString github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListOptionString +func wasmimport_IdentityListOptionString(arg0 *github_com__bytecodealliance__wasm___tools___go__cm.Option[string], arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__bytecodealliance__wasm___tools___go__cm.Option[string]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-option-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListRecordPrimitives github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListRecordPrimitives +func wasmimport_IdentityListRecordPrimitives(arg0 *github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Primitives, arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Primitives]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-record-primitives", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListResultString github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListResultString +func wasmimport_IdentityListResultString(arg0 *github_com__bytecodealliance__wasm___tools___go__cm.Result[string, string, struct{}], arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__bytecodealliance__wasm___tools___go__cm.Result[string, string, struct{}]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-result-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListString github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListString +func wasmimport_IdentityListString(arg0 *string, arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListU16 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListU16 +func wasmimport_IdentityListU16(arg0 *uint16, arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[uint16]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-u16", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityListVariant github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityListVariant +func wasmimport_IdentityListVariant(arg0 *github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Var, arg1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Var]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-list-variant", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityOptionString github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityOptionString +func wasmimport_IdentityOptionString(arg0 uint32, arg1 *uint8, arg2 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-option-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityPrimitives github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityPrimitives +func wasmimport_IdentityPrimitives(a0 uint32, b0 uint32, c0 uint32, d0 uint64, e0 uint32, f0 uint32, g0 uint32, h0 uint64, i0 float32, j0 float64, k0 uint32, l0 uint32, m0 *uint8, m1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Tuple13[uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, float64, bool, rune, string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-primitives", func() unsafe.Pointer { + ptr := unsafe.Pointer(&a0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&b0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&c0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&d0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&e0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&f0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&g0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&h0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&i0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&j0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&k0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&l0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(m0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&m1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityRecordPrimitives github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityRecordPrimitives +func wasmimport_IdentityRecordPrimitives(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint64, arg4 uint32, arg5 uint32, arg6 uint32, arg7 uint64, arg8 float32, arg9 float64, arg10 uint32, arg11 uint32, arg12 *uint8, arg13 uint32, result *github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Primitives) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-record-primitives", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg3) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg4) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg5) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg6) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg7) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg8) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg9) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg10) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg11) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(arg12) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg13) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityRecordRec github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityRecordRec +func wasmimport_IdentityRecordRec(arg0 *uint8, arg1 uint32, result *github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Rec) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-record-rec", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityResultString github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityResultString +func wasmimport_IdentityResultString(arg0 uint32, arg1 *uint8, arg2 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[string, string, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-result-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityS16 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityS16 +func wasmimport_IdentityS16(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-s16", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityS32 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityS32 +func wasmimport_IdentityS32(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-s32", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityS64 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityS64 +func wasmimport_IdentityS64(arg0 uint64) (result0 uint64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-s64", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityS8 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityS8 +func wasmimport_IdentityS8(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-s8", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityString github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityString +func wasmimport_IdentityString(arg0 *uint8, arg1 uint32, result *string) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityTuple github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityTuple +func wasmimport_IdentityTuple(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint64, arg4 uint32, arg5 uint32, arg6 uint32, arg7 uint64, arg8 float32, arg9 float64, arg10 uint32, arg11 uint32, arg12 *uint8, arg13 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Tuple13[uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, float64, bool, rune, string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-tuple", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg3) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg4) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg5) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg6) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg7) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg8) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg9) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg10) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg11) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(arg12) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg13) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityU16 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityU16 +func wasmimport_IdentityU16(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-u16", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityU32 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityU32 +func wasmimport_IdentityU32(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-u32", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityU64 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityU64 +func wasmimport_IdentityU64(arg0 uint64) (result0 uint64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-u64", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityU8 github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityU8 +func wasmimport_IdentityU8(arg0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-u8", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IdentityVariant github.com/wasmCloud/wadge/tests/go/sync/bindings/wadge-test/sync/sync.wasmimport_IdentityVariant +func wasmimport_IdentityVariant(arg0 uint32, arg1 *uint8, arg2 uint32, result *github_com__wasmCloud__wadge__tests__go__sync__bindings__wadge___test__sync__sync.Var) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:sync/sync", "identity-variant", func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(arg1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&arg2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} diff --git a/tests/go/wasi/bindings/west-test/fib/fib/empty.s b/tests/go/wasi/bindings/wadge-test/fib/fib/empty.s similarity index 100% rename from tests/go/wasi/bindings/west-test/fib/fib/empty.s rename to tests/go/wasi/bindings/wadge-test/fib/fib/empty.s diff --git a/tests/go/wasi/bindings/west-test/fib/fib/fib.wit.go b/tests/go/wasi/bindings/wadge-test/fib/fib/fib.wit.go similarity index 76% rename from tests/go/wasi/bindings/west-test/fib/fib/fib.wit.go rename to tests/go/wasi/bindings/wadge-test/fib/fib/fib.wit.go index ae6ab59..ea87ee6 100644 --- a/tests/go/wasi/bindings/west-test/fib/fib/fib.wit.go +++ b/tests/go/wasi/bindings/wadge-test/fib/fib/fib.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package fib represents the imported interface "west-test:fib/fib". +// Package fib represents the imported interface "wadge-test:fib/fib". package fib // Fib represents the imported function "fib". @@ -15,6 +15,6 @@ func Fib(n uint32) (result uint64) { return } -//go:wasmimport west-test:fib/fib fib +//go:wasmimport wadge-test:fib/fib fib //go:noescape func wasmimport_Fib(n0 uint32) (result0 uint64) diff --git a/tests/go/wasi/bindings/west-test/leftpad/leftpad/abi.go b/tests/go/wasi/bindings/wadge-test/leftpad/leftpad/abi.go similarity index 77% rename from tests/go/wasi/bindings/west-test/leftpad/leftpad/abi.go rename to tests/go/wasi/bindings/wadge-test/leftpad/leftpad/abi.go index 51b6fec..f31c79b 100644 --- a/tests/go/wasi/bindings/west-test/leftpad/leftpad/abi.go +++ b/tests/go/wasi/bindings/wadge-test/leftpad/leftpad/abi.go @@ -3,7 +3,7 @@ package leftpad import ( - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" "unsafe" ) diff --git a/tests/go/wasi/bindings/west-test/leftpad/leftpad/empty.s b/tests/go/wasi/bindings/wadge-test/leftpad/leftpad/empty.s similarity index 100% rename from tests/go/wasi/bindings/west-test/leftpad/leftpad/empty.s rename to tests/go/wasi/bindings/wadge-test/leftpad/leftpad/empty.s diff --git a/tests/go/wasi/bindings/west-test/leftpad/leftpad/leftpad.wit.go b/tests/go/wasi/bindings/wadge-test/leftpad/leftpad/leftpad.wit.go similarity index 80% rename from tests/go/wasi/bindings/west-test/leftpad/leftpad/leftpad.wit.go rename to tests/go/wasi/bindings/wadge-test/leftpad/leftpad/leftpad.wit.go index d937114..bba75c3 100644 --- a/tests/go/wasi/bindings/west-test/leftpad/leftpad/leftpad.wit.go +++ b/tests/go/wasi/bindings/wadge-test/leftpad/leftpad/leftpad.wit.go @@ -1,11 +1,11 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package leftpad represents the imported interface "west-test:leftpad/leftpad". +// Package leftpad represents the imported interface "wadge-test:leftpad/leftpad". package leftpad import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" ) // Leftpad represents the imported function "leftpad". @@ -23,6 +23,6 @@ func Leftpad(in streams.InputStream, out streams.OutputStream, len_ uint64, c ru return } -//go:wasmimport west-test:leftpad/leftpad leftpad +//go:wasmimport wadge-test:leftpad/leftpad leftpad //go:noescape func wasmimport_Leftpad(in0 uint32, out0 uint32, len0 uint64, c0 uint32, result *cm.Result[streams.StreamError, struct{}, streams.StreamError]) diff --git a/tests/go/wasi/bindings/west-test/wasi/service/service.wit.go b/tests/go/wasi/bindings/wadge-test/wasi/service/service.wit.go similarity index 50% rename from tests/go/wasi/bindings/west-test/wasi/service/service.wit.go rename to tests/go/wasi/bindings/wadge-test/wasi/service/service.wit.go index 43c2607..9b14ea8 100644 --- a/tests/go/wasi/bindings/west-test/wasi/service/service.wit.go +++ b/tests/go/wasi/bindings/wadge-test/wasi/service/service.wit.go @@ -1,4 +1,4 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package service represents the world "west-test:wasi/service". +// Package service represents the world "wadge-test:wasi/service". package service diff --git a/tests/go/wasi/bindings/wasi/cli/stderr/stderr.wit.go b/tests/go/wasi/bindings/wasi/cli/stderr/stderr.wit.go index e6e67ff..3a0d2e1 100644 --- a/tests/go/wasi/bindings/wasi/cli/stderr/stderr.wit.go +++ b/tests/go/wasi/bindings/wasi/cli/stderr/stderr.wit.go @@ -5,7 +5,7 @@ package stderr import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" ) // GetStderr represents the imported function "get-stderr". diff --git a/tests/go/wasi/bindings/wasi/cli/stdin/stdin.wit.go b/tests/go/wasi/bindings/wasi/cli/stdin/stdin.wit.go index e522b59..016fbaa 100644 --- a/tests/go/wasi/bindings/wasi/cli/stdin/stdin.wit.go +++ b/tests/go/wasi/bindings/wasi/cli/stdin/stdin.wit.go @@ -5,7 +5,7 @@ package stdin import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" ) // GetStdin represents the imported function "get-stdin". diff --git a/tests/go/wasi/bindings/wasi/cli/stdout/stdout.wit.go b/tests/go/wasi/bindings/wasi/cli/stdout/stdout.wit.go index f371f3a..404198e 100644 --- a/tests/go/wasi/bindings/wasi/cli/stdout/stdout.wit.go +++ b/tests/go/wasi/bindings/wasi/cli/stdout/stdout.wit.go @@ -5,7 +5,7 @@ package stdout import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" ) // GetStdout represents the imported function "get-stdout". diff --git a/tests/go/wasi/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go b/tests/go/wasi/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go index 9380553..642b511 100644 --- a/tests/go/wasi/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go +++ b/tests/go/wasi/bindings/wasi/cli/terminal-stderr/terminal-stderr.wit.go @@ -8,7 +8,7 @@ package terminalstderr import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminaloutput "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/cli/terminal-output" + terminaloutput "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/cli/terminal-output" ) // GetTerminalStderr represents the imported function "get-terminal-stderr". diff --git a/tests/go/wasi/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go b/tests/go/wasi/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go index bfddf75..f69cc43 100644 --- a/tests/go/wasi/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go +++ b/tests/go/wasi/bindings/wasi/cli/terminal-stdin/terminal-stdin.wit.go @@ -8,7 +8,7 @@ package terminalstdin import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminalinput "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/cli/terminal-input" + terminalinput "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/cli/terminal-input" ) // GetTerminalStdin represents the imported function "get-terminal-stdin". diff --git a/tests/go/wasi/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go b/tests/go/wasi/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go index dd3228a..811d228 100644 --- a/tests/go/wasi/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go +++ b/tests/go/wasi/bindings/wasi/cli/terminal-stdout/terminal-stdout.wit.go @@ -8,7 +8,7 @@ package terminalstdout import ( "github.com/bytecodealliance/wasm-tools-go/cm" - terminaloutput "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/cli/terminal-output" + terminaloutput "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/cli/terminal-output" ) // GetTerminalStdout represents the imported function "get-terminal-stdout". diff --git a/tests/go/wasi/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go b/tests/go/wasi/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go index 61c9caf..411a19e 100644 --- a/tests/go/wasi/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go +++ b/tests/go/wasi/bindings/wasi/clocks/monotonic-clock/monotonic-clock.wit.go @@ -14,7 +14,7 @@ package monotonicclock import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" ) // Instant represents the u64 "wasi:clocks/monotonic-clock@0.2.1#instant". diff --git a/tests/go/wasi/bindings/wasi/clocks/timezone/abi.go b/tests/go/wasi/bindings/wasi/clocks/timezone/abi.go index 10e77b2..80e6fe4 100644 --- a/tests/go/wasi/bindings/wasi/clocks/timezone/abi.go +++ b/tests/go/wasi/bindings/wasi/clocks/timezone/abi.go @@ -3,7 +3,7 @@ package timezone import ( - wallclock "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/wall-clock" ) func lower_DateTime(v wallclock.DateTime) (f0 uint64, f1 uint32) { diff --git a/tests/go/wasi/bindings/wasi/clocks/timezone/timezone.wit.go b/tests/go/wasi/bindings/wasi/clocks/timezone/timezone.wit.go index 1c6fe20..5909183 100644 --- a/tests/go/wasi/bindings/wasi/clocks/timezone/timezone.wit.go +++ b/tests/go/wasi/bindings/wasi/clocks/timezone/timezone.wit.go @@ -4,7 +4,7 @@ package timezone import ( - wallclock "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/wall-clock" ) // TimezoneDisplay represents the record "wasi:clocks/timezone@0.2.1#timezone-display". diff --git a/tests/go/wasi/bindings/wasi/filesystem/preopens/preopens.wit.go b/tests/go/wasi/bindings/wasi/filesystem/preopens/preopens.wit.go index 67e31d6..65fde09 100644 --- a/tests/go/wasi/bindings/wasi/filesystem/preopens/preopens.wit.go +++ b/tests/go/wasi/bindings/wasi/filesystem/preopens/preopens.wit.go @@ -5,7 +5,7 @@ package preopens import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/filesystem/types" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/filesystem/types" ) // GetDirectories represents the imported function "get-directories". diff --git a/tests/go/wasi/bindings/wasi/filesystem/types/abi.go b/tests/go/wasi/bindings/wasi/filesystem/types/abi.go index 84ba3b4..7e2d47d 100644 --- a/tests/go/wasi/bindings/wasi/filesystem/types/abi.go +++ b/tests/go/wasi/bindings/wasi/filesystem/types/abi.go @@ -4,7 +4,7 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - wallclock "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/clocks/wall-clock" + wallclock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/wall-clock" "unsafe" ) diff --git a/tests/go/wasi/bindings/wasi/filesystem/types/types.wit.go b/tests/go/wasi/bindings/wasi/filesystem/types/types.wit.go index e2b35f1..e79c142 100644 --- a/tests/go/wasi/bindings/wasi/filesystem/types/types.wit.go +++ b/tests/go/wasi/bindings/wasi/filesystem/types/types.wit.go @@ -30,9 +30,9 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - wallclock "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/clocks/wall-clock" - ioerror "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/error" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" + wallclock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/wall-clock" + ioerror "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" ) // FileSize represents the u64 "wasi:filesystem/types@0.2.1#filesize". diff --git a/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.exports.go b/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.exports.go index b5d527b..3f0cf16 100644 --- a/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.exports.go +++ b/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.exports.go @@ -3,7 +3,7 @@ package incominghandler import ( - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types" ) // Exports represents the caller-defined exports from "wasi:http/incoming-handler@0.2.1". diff --git a/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.wit.go b/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.wit.go index cf9885d..f6b7d53 100644 --- a/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.wit.go +++ b/tests/go/wasi/bindings/wasi/http/incoming-handler/incoming-handler.wit.go @@ -8,7 +8,7 @@ package incominghandler import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types" ) //go:wasmexport wasi:http/incoming-handler@0.2.1#handle diff --git a/tests/go/wasi/bindings/wasi/http/types/abi.go b/tests/go/wasi/bindings/wasi/http/types/abi.go index 3cc961f..31dac3a 100644 --- a/tests/go/wasi/bindings/wasi/http/types/abi.go +++ b/tests/go/wasi/bindings/wasi/http/types/abi.go @@ -4,7 +4,7 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" + monotonicclock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" "unsafe" ) diff --git a/tests/go/wasi/bindings/wasi/http/types/types.wit.go b/tests/go/wasi/bindings/wasi/http/types/types.wit.go index 3ea1808..16e7d4a 100644 --- a/tests/go/wasi/bindings/wasi/http/types/types.wit.go +++ b/tests/go/wasi/bindings/wasi/http/types/types.wit.go @@ -9,10 +9,10 @@ package types import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" - ioerror "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/error" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/poll" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" + monotonicclock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" + ioerror "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" ) // Method represents the variant "wasi:http/types@0.2.1#method". diff --git a/tests/go/wasi/bindings/wasi/io/streams/streams.wit.go b/tests/go/wasi/bindings/wasi/io/streams/streams.wit.go index 3dc8644..3c4cc45 100644 --- a/tests/go/wasi/bindings/wasi/io/streams/streams.wit.go +++ b/tests/go/wasi/bindings/wasi/io/streams/streams.wit.go @@ -11,8 +11,8 @@ package streams import ( "github.com/bytecodealliance/wasm-tools-go/cm" - ioerror "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/error" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/poll" + ioerror "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/error" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" ) // StreamError represents the imported variant "wasi:io/streams@0.2.1#stream-error". diff --git a/tests/go/wasi/bindings/wasi/sockets/instance-network/instance-network.wit.go b/tests/go/wasi/bindings/wasi/sockets/instance-network/instance-network.wit.go index fa9e856..a58edca 100644 --- a/tests/go/wasi/bindings/wasi/sockets/instance-network/instance-network.wit.go +++ b/tests/go/wasi/bindings/wasi/sockets/instance-network/instance-network.wit.go @@ -7,7 +7,7 @@ package instancenetwork import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" ) // InstanceNetwork represents the imported function "instance-network". diff --git a/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/abi.go b/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/abi.go index 5daf431..588cf06 100644 --- a/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/abi.go +++ b/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/abi.go @@ -4,7 +4,7 @@ package ipnamelookup import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" "unsafe" ) diff --git a/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go b/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go index cec76ce..fe15d14 100644 --- a/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go +++ b/tests/go/wasi/bindings/wasi/sockets/ip-name-lookup/ip-name-lookup.wit.go @@ -5,8 +5,8 @@ package ipnamelookup import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/poll" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" ) // ResolveAddressStream represents the imported resource "wasi:sockets/ip-name-lookup@0.2.1#resolve-address-stream". diff --git a/tests/go/wasi/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go b/tests/go/wasi/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go index d30f8a5..f0d3f98 100644 --- a/tests/go/wasi/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go +++ b/tests/go/wasi/bindings/wasi/sockets/tcp-create-socket/tcp-create-socket.wit.go @@ -5,8 +5,8 @@ package tcpcreatesocket import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/tcp" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/tcp" ) // CreateTCPSocket represents the imported function "create-tcp-socket". diff --git a/tests/go/wasi/bindings/wasi/sockets/tcp/abi.go b/tests/go/wasi/bindings/wasi/sockets/tcp/abi.go index 36e19e5..fa903ef 100644 --- a/tests/go/wasi/bindings/wasi/sockets/tcp/abi.go +++ b/tests/go/wasi/bindings/wasi/sockets/tcp/abi.go @@ -4,8 +4,8 @@ package tcp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" "unsafe" ) diff --git a/tests/go/wasi/bindings/wasi/sockets/tcp/tcp.wit.go b/tests/go/wasi/bindings/wasi/sockets/tcp/tcp.wit.go index ab074bd..c23c623 100644 --- a/tests/go/wasi/bindings/wasi/sockets/tcp/tcp.wit.go +++ b/tests/go/wasi/bindings/wasi/sockets/tcp/tcp.wit.go @@ -5,10 +5,10 @@ package tcp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - monotonicclock "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/poll" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/streams" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" + monotonicclock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" ) // ShutdownType represents the enum "wasi:sockets/tcp@0.2.1#shutdown-type". diff --git a/tests/go/wasi/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go b/tests/go/wasi/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go index bc8b50e..50d56d0 100644 --- a/tests/go/wasi/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go +++ b/tests/go/wasi/bindings/wasi/sockets/udp-create-socket/udp-create-socket.wit.go @@ -5,8 +5,8 @@ package udpcreatesocket import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/udp" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/udp" ) // CreateUDPSocket represents the imported function "create-udp-socket". diff --git a/tests/go/wasi/bindings/wasi/sockets/udp/abi.go b/tests/go/wasi/bindings/wasi/sockets/udp/abi.go index cc01b48..aa67f0e 100644 --- a/tests/go/wasi/bindings/wasi/sockets/udp/abi.go +++ b/tests/go/wasi/bindings/wasi/sockets/udp/abi.go @@ -4,7 +4,7 @@ package udp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" "unsafe" ) diff --git a/tests/go/wasi/bindings/wasi/sockets/udp/udp.wit.go b/tests/go/wasi/bindings/wasi/sockets/udp/udp.wit.go index 5398855..eb5188f 100644 --- a/tests/go/wasi/bindings/wasi/sockets/udp/udp.wit.go +++ b/tests/go/wasi/bindings/wasi/sockets/udp/udp.wit.go @@ -5,8 +5,8 @@ package udp import ( "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/io/poll" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/sockets/network" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/sockets/network" ) // IncomingDatagram represents the record "wasi:sockets/udp@0.2.1#incoming-datagram". diff --git a/tests/go/wasi/wadge_bindings_test.go b/tests/go/wasi/wadge_bindings_test.go new file mode 100644 index 0000000..8aac655 --- /dev/null +++ b/tests/go/wasi/wadge_bindings_test.go @@ -0,0 +1,2006 @@ +// Code generated by wadge-bindgen-go DO NOT EDIT + +package wasi_test + +import ( + github_com__bytecodealliance__wasm___tools___go__cm "github.com/bytecodealliance/wasm-tools-go/cm" + wadge "github.com/wasmCloud/wadge" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__poll "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll" + github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams" + "runtime" + "unsafe" +) + +const _ string = runtime.Compiler + +var _ unsafe.Pointer + +//go:linkname wasmimport_Fib github.com/wasmCloud/wadge/tests/go/wasi/bindings/wadge-test/fib/fib.wasmimport_Fib +func wasmimport_Fib(n0 uint32) (result0 uint64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:fib/fib", "fib", func() unsafe.Pointer { + ptr := unsafe.Pointer(&n0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_Leftpad github.com/wasmCloud/wadge/tests/go/wasi/bindings/wadge-test/leftpad/leftpad.wasmimport_Leftpad +func wasmimport_Leftpad(in0 uint32, out0 uint32, len0 uint64, c0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wadge-test:leftpad/leftpad", "leftpad", func() unsafe.Pointer { + ptr := unsafe.Pointer(&in0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&out0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&c0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_Now github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_Now +func wasmimport_Now() (result0 uint64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "now", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_Resolution github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_Resolution +func wasmimport_Resolution() (result0 uint64) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "resolution", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_SubscribeDuration github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeDuration +func wasmimport_SubscribeDuration(when0 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "subscribe-duration", func() unsafe.Pointer { + ptr := unsafe.Pointer(&when0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_SubscribeInstant github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/clocks/monotonic-clock.wasmimport_SubscribeInstant +func wasmimport_SubscribeInstant(when0 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.1", "subscribe-instant", func() unsafe.Pointer { + ptr := unsafe.Pointer(&when0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewFields github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewFields +func wasmimport_NewFields() (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]fields", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewOutgoingRequest github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewOutgoingRequest +func wasmimport_NewOutgoingRequest(headers0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]outgoing-request", func() unsafe.Pointer { + ptr := unsafe.Pointer(&headers0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewOutgoingResponse github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewOutgoingResponse +func wasmimport_NewOutgoingResponse(headers0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]outgoing-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&headers0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_NewRequestOptions github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_NewRequestOptions +func wasmimport_NewRequestOptions() (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[constructor]request-options", func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsAppend github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsAppend +func wasmimport_FieldsAppend(self0 uint32, name0 *uint8, name1 uint32, value0 *uint8, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.append", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(value0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&value1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsClone github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsClone +func wasmimport_FieldsClone(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.clone", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsDelete github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsDelete +func wasmimport_FieldsDelete(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.delete", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsEntries github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsEntries +func wasmimport_FieldsEntries(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.entries", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsGet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsGet +func wasmimport_FieldsGet(self0 uint32, name0 *uint8, name1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.get", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsHas github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsHas +func wasmimport_FieldsHas(self0 uint32, name0 *uint8, name1 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.has", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsSet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsSet +func wasmimport_FieldsSet(self0 uint32, name0 *uint8, name1 uint32, value0 *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue, value1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]fields.set", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(name0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&name1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(value0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&value1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureIncomingResponseGet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureIncomingResponseGet +func wasmimport_FutureIncomingResponseGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingResponse, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], struct{}]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-incoming-response.get", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureIncomingResponseSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureIncomingResponseSubscribe +func wasmimport_FutureIncomingResponseSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-incoming-response.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureTrailersGet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureTrailersGet +func wasmimport_FutureTrailersGet(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCodeShape, github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode], struct{}]]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-trailers.get", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureTrailersSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureTrailersSubscribe +func wasmimport_FutureTrailersSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]future-trailers.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingBodyStream github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingBodyStream +func wasmimport_IncomingBodyStream(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.InputStream, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.InputStream, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-body.stream", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestAuthority github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestAuthority +func wasmimport_IncomingRequestAuthority(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.authority", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestConsume github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestConsume +func wasmimport_IncomingRequestConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.consume", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestHeaders +func wasmimport_IncomingRequestHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestMethod github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestMethod +func wasmimport_IncomingRequestMethod(self0 uint32, result *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Method) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.method", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestPathWithQuery github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestPathWithQuery +func wasmimport_IncomingRequestPathWithQuery(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.path-with-query", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestScheme github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestScheme +func wasmimport_IncomingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Scheme]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-request.scheme", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseConsume github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseConsume +func wasmimport_IncomingResponseConsume(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.IncomingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.consume", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseHeaders +func wasmimport_IncomingResponseHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseStatus github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseStatus +func wasmimport_IncomingResponseStatus(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]incoming-response.status", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingBodyWrite github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingBodyWrite +func wasmimport_OutgoingBodyWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.OutputStream, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.OutputStream, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-body.write", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestAuthority github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestAuthority +func wasmimport_OutgoingRequestAuthority(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.authority", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestBody github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestBody +func wasmimport_OutgoingRequestBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestHeaders +func wasmimport_OutgoingRequestHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestMethod github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestMethod +func wasmimport_OutgoingRequestMethod(self0 uint32, result *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Method) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.method", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestPathWithQuery github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestPathWithQuery +func wasmimport_OutgoingRequestPathWithQuery(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[string]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.path-with-query", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestScheme github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestScheme +func wasmimport_OutgoingRequestScheme(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Scheme]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.scheme", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetAuthority github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetAuthority +func wasmimport_OutgoingRequestSetAuthority(self0 uint32, authority0 uint32, authority1 *uint8, authority2 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-authority", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&authority0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(authority1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&authority2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetMethod github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetMethod +func wasmimport_OutgoingRequestSetMethod(self0 uint32, method0 uint32, method1 *uint8, method2 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-method", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&method0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(method1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&method2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetPathWithQuery github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetPathWithQuery +func wasmimport_OutgoingRequestSetPathWithQuery(self0 uint32, pathWithQuery0 uint32, pathWithQuery1 *uint8, pathWithQuery2 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-path-with-query", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&pathWithQuery0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(pathWithQuery1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&pathWithQuery2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestSetScheme github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestSetScheme +func wasmimport_OutgoingRequestSetScheme(self0 uint32, scheme0 uint32, scheme1 uint32, scheme2 *uint8, scheme3 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-request.set-scheme", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&scheme0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&scheme1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(scheme2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&scheme3) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseBody github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseBody +func wasmimport_OutgoingResponseBody(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.OutgoingBody, struct{}]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseHeaders github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseHeaders +func wasmimport_OutgoingResponseHeaders(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.headers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseSetStatusCode github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseSetStatusCode +func wasmimport_OutgoingResponseSetStatusCode(self0 uint32, statusCode0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.set-status-code", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&statusCode0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseStatusCode github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseStatusCode +func wasmimport_OutgoingResponseStatusCode(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]outgoing-response.status-code", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsBetweenBytesTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsBetweenBytesTimeout +func wasmimport_RequestOptionsBetweenBytesTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock.Duration]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.between-bytes-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsConnectTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsConnectTimeout +func wasmimport_RequestOptionsConnectTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock.Duration]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.connect-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsFirstByteTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsFirstByteTimeout +func wasmimport_RequestOptionsFirstByteTimeout(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__clocks__monotonic___clock.Duration]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.first-byte-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsSetBetweenBytesTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsSetBetweenBytesTimeout +func wasmimport_RequestOptionsSetBetweenBytesTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-between-bytes-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsSetConnectTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsSetConnectTimeout +func wasmimport_RequestOptionsSetConnectTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-connect-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsSetFirstByteTimeout github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsSetFirstByteTimeout +func wasmimport_RequestOptionsSetFirstByteTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[method]request-options.set-first-byte-timeout", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&duration1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsResourceDrop +func wasmimport_FieldsResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]fields", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureIncomingResponseResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureIncomingResponseResourceDrop +func wasmimport_FutureIncomingResponseResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]future-incoming-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FutureTrailersResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FutureTrailersResourceDrop +func wasmimport_FutureTrailersResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]future-trailers", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingBodyResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingBodyResourceDrop +func wasmimport_IncomingBodyResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingRequestResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingRequestResourceDrop +func wasmimport_IncomingRequestResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-request", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingResponseResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingResponseResourceDrop +func wasmimport_IncomingResponseResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]incoming-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingBodyResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingBodyResourceDrop +func wasmimport_OutgoingBodyResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-body", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingRequestResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingRequestResourceDrop +func wasmimport_OutgoingRequestResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-request", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingResponseResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingResponseResourceDrop +func wasmimport_OutgoingResponseResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]outgoing-response", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_RequestOptionsResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_RequestOptionsResourceDrop +func wasmimport_RequestOptionsResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]request-options", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ResponseOutparamResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_ResponseOutparamResourceDrop +func wasmimport_ResponseOutparamResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[resource-drop]response-outparam", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_FieldsFromList github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_FieldsFromList +func wasmimport_FieldsFromList(entries0 *github_com__bytecodealliance__wasm___tools___go__cm.Tuple[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldKey, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.FieldValue], entries1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.Fields, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.HeaderError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]fields.from-list", func() unsafe.Pointer { + ptr := unsafe.Pointer(entries0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&entries1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_IncomingBodyFinish github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_IncomingBodyFinish +func wasmimport_IncomingBodyFinish(this0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]incoming-body.finish", func() unsafe.Pointer { + ptr := unsafe.Pointer(&this0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutgoingBodyFinish github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_OutgoingBodyFinish +func wasmimport_OutgoingBodyFinish(this0 uint32, trailers0 uint32, trailers1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]outgoing-body.finish", func() unsafe.Pointer { + ptr := unsafe.Pointer(&this0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&trailers0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&trailers1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ResponseOutparamSet github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_ResponseOutparamSet +func wasmimport_ResponseOutparamSet(param0 uint32, response0 uint32, response1 uint32, response2 uint32, response3 uint64, response4 uint32, response5 uint32, response6 uint32, response7 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "[static]response-outparam.set", func() unsafe.Pointer { + ptr := unsafe.Pointer(¶m0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response2) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response3) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response4) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response5) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response6) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&response7) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_HTTPErrorCode github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types.wasmimport_HTTPErrorCode +func wasmimport_HTTPErrorCode(err0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Option[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__http__types.ErrorCode]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:http/types@0.2.1", "http-error-code", func() unsafe.Pointer { + ptr := unsafe.Pointer(&err0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ErrorToDebugString github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/error.wasmimport_ErrorToDebugString +func wasmimport_ErrorToDebugString(self0 uint32, result *string) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/error@0.2.1", "[method]error.to-debug-string", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_ErrorResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/error.wasmimport_ErrorResourceDrop +func wasmimport_ErrorResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/error@0.2.1", "[resource-drop]error", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_PollableBlock github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_PollableBlock +func wasmimport_PollableBlock(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "[method]pollable.block", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_PollableReady github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_PollableReady +func wasmimport_PollableReady(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "[method]pollable.ready", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_PollableResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_PollableResourceDrop +func wasmimport_PollableResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "[resource-drop]pollable", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_Poll github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/poll.wasmimport_Poll +func wasmimport_Poll(in0 *github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__poll.Pollable, in1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.List[uint32]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/poll@0.2.1", "poll", func() unsafe.Pointer { + ptr := unsafe.Pointer(in0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&in1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamBlockingRead github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamBlockingRead +func wasmimport_InputStreamBlockingRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.blocking-read", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamBlockingSkip github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamBlockingSkip +func wasmimport_InputStreamBlockingSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.blocking-skip", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamRead github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamRead +func wasmimport_InputStreamRead(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__bytecodealliance__wasm___tools___go__cm.List[uint8], github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.read", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamSkip github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamSkip +func wasmimport_InputStreamSkip(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.skip", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamSubscribe +func wasmimport_InputStreamSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]input-stream.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingFlush +func wasmimport_OutputStreamBlockingFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingSplice github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingSplice +func wasmimport_OutputStreamBlockingSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-splice", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&src0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingWriteAndFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteAndFlush +func wasmimport_OutputStreamBlockingWriteAndFlush(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-write-and-flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(contents0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&contents1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamBlockingWriteZeroesAndFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamBlockingWriteZeroesAndFlush +func wasmimport_OutputStreamBlockingWriteZeroesAndFlush(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.blocking-write-zeroes-and-flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamCheckWrite github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamCheckWrite +func wasmimport_OutputStreamCheckWrite(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.check-write", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamFlush github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamFlush +func wasmimport_OutputStreamFlush(self0 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.flush", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamSplice github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamSplice +func wasmimport_OutputStreamSplice(self0 uint32, src0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[uint64, uint64, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.splice", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&src0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamSubscribe github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamSubscribe +func wasmimport_OutputStreamSubscribe(self0 uint32) (result0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.subscribe", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&result0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamWrite github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamWrite +func wasmimport_OutputStreamWrite(self0 uint32, contents0 *uint8, contents1 uint32, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.write", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(contents0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&contents1) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamWriteZeroes github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamWriteZeroes +func wasmimport_OutputStreamWriteZeroes(self0 uint32, len0 uint64, result *github_com__bytecodealliance__wasm___tools___go__cm.Result[github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError, struct{}, github_com__wasmCloud__wadge__tests__go__wasi__bindings__wasi__io__streams.StreamError]) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[method]output-stream.write-zeroes", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(&len0) + __p.Pin(ptr) + return ptr + }(), func() unsafe.Pointer { + ptr := unsafe.Pointer(result) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_InputStreamResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_InputStreamResourceDrop +func wasmimport_InputStreamResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[resource-drop]input-stream", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} + +//go:linkname wasmimport_OutputStreamResourceDrop github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/io/streams.wasmimport_OutputStreamResourceDrop +func wasmimport_OutputStreamResourceDrop(self0 uint32) { + var __p runtime.Pinner + defer __p.Unpin() + if __err := wadge.WithCurrentInstance(func(__instance *wadge.Instance) error { + return __instance.Call("wasi:io/streams@0.2.1", "[resource-drop]output-stream", func() unsafe.Pointer { + ptr := unsafe.Pointer(&self0) + __p.Pin(ptr) + return ptr + }()) + }); __err != nil { + wadge.CurrentErrorHandler()(__err) + } + return +} diff --git a/tests/go/wasi/wasi.go b/tests/go/wasi/wasi.go index e002b2d..28ad87b 100644 --- a/tests/go/wasi/wasi.go +++ b/tests/go/wasi/wasi.go @@ -7,10 +7,10 @@ import ( "strconv" "github.com/bytecodealliance/wasm-tools-go/cm" - incominghandler "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/incoming-handler" - "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/types" - "github.com/wasmCloud/west/tests/go/wasi/bindings/west-test/fib/fib" - "github.com/wasmCloud/west/tests/go/wasi/bindings/west-test/leftpad/leftpad" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wadge-test/fib/fib" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wadge-test/leftpad/leftpad" + incominghandler "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/incoming-handler" + "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/types" ) func init() { diff --git a/tests/go/wasi/wasi_test.go b/tests/go/wasi/wasi_test.go index 472c4f8..c40a581 100644 --- a/tests/go/wasi/wasi_test.go +++ b/tests/go/wasi/wasi_test.go @@ -1,4 +1,4 @@ -//go:generate go run github.com/wasmCloud/west/cmd/west-bindgen-go +//go:generate go run github.com/wasmCloud/wadge/cmd/wadge-bindgen-go //go:generate cargo build -p wasi-test-component --target wasm32-wasip1 //go:generate cp ../../../target/wasm32-wasip1/debug/wasi_test_component.wasm component.wasm @@ -15,10 +15,10 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/wasmCloud/west" - _ "github.com/wasmCloud/west/bindings" - incominghandler "github.com/wasmCloud/west/tests/go/wasi/bindings/wasi/http/incoming-handler" - "github.com/wasmCloud/west/westhttp" + "github.com/wasmCloud/wadge" + _ "github.com/wasmCloud/wadge/bindings" + incominghandler "github.com/wasmCloud/wadge/tests/go/wasi/bindings/wasi/http/incoming-handler" + "github.com/wasmCloud/wadge/wadgehttp" ) //go:embed component.wasm @@ -35,17 +35,17 @@ func init() { }, }))) - instance, err := west.NewInstance(&west.Config{ + instance, err := wadge.NewInstance(&wadge.Config{ Wasm: component, }) if err != nil { log.Fatalf("failed to construct new instance: %s", err) } - west.SetInstance(instance) + wadge.SetInstance(instance) } func TestIncomingHandler(t *testing.T) { - west.RunTest(t, func() { + wadge.RunTest(t, func() { req, err := http.NewRequest(http.MethodPost, "5", bytes.NewReader([]byte("foo bar baz"))) if err != nil { t.Fatalf("failed to create new HTTP request: %s", err) @@ -53,7 +53,7 @@ func TestIncomingHandler(t *testing.T) { req.Header.Add("foo", "bar") req.Header.Add("foo", "baz") req.Header.Add("key", "value") - resp, err := westhttp.HandleIncomingRequest(incominghandler.Exports.Handle, req) + resp, err := wadgehttp.HandleIncomingRequest(incominghandler.Exports.Handle, req) if err != nil { t.Fatalf("failed to handle incoming HTTP request: %s", err) } diff --git a/tests/go/wasi/wit/app.wit b/tests/go/wasi/wit/app.wit index c753185..62385c7 100644 --- a/tests/go/wasi/wit/app.wit +++ b/tests/go/wasi/wit/app.wit @@ -1,4 +1,4 @@ -package west-test:wasi; +package wadge-test:wasi; world service { export wasi:http/incoming-handler@0.2.1; @@ -6,6 +6,6 @@ world service { // Import all CLI interfaces, which are used by Go libraries include wasi:cli/imports@0.2.1; - include west-test:fib/guest; - include west-test:leftpad/guest; + include wadge-test:fib/guest; + include wadge-test:leftpad/guest; } diff --git a/tests/go/wasi/wit/deps.lock b/tests/go/wasi/wit/deps.lock index b503d16..82774b2 100644 --- a/tests/go/wasi/wit/deps.lock +++ b/tests/go/wasi/wit/deps.lock @@ -8,8 +8,8 @@ sha512 = "5efc22927c46cd56c41e5549ec775561c7fac2ea0d365abc0b55396d9475a7c9f98407 [fib] path = "../../../wit/fib" -sha256 = "a818ecd4b5f4e3a092d747d9e69e1c706bd8ac3950dced24d8ae78f96bd5e851" -sha512 = "ad9795f9300ae1f7ab8f9dd56da5db7dafc3c15476d6c1768a56a968d9a0aeae435b9e8836405a9673b9a68e3eea8b653d6e19b4b90aba047646f3839712b5b4" +sha256 = "fed9a0fbd7e7d4c5630f061c435f24a9308b19873a896bfca20205d3f799ce47" +sha512 = "bfc32016f0f5d22e87f5cb0c500800228c4dd086eb46d8f677b96eb81d5b6a0161603c9aeb98b01c7e3129ab0da3325fdb31542be643ac981e143a8d6c39ce93" [filesystem] sha256 = "cfe8c420e8b857de612ae2a3336680dae16b95c93c8ba3a6ff05b21210966740" @@ -27,8 +27,8 @@ sha512 = "94624f00c66e66203592cee820f80b1ba91ecdb71f682c154f25eaf71f8d8954197dcb [leftpad] path = "../../../wit/leftpad" -sha256 = "e782b0bd33116f3831dbd131761bc457ec9064037d10e19ffe8e2f70e6dc73a4" -sha512 = "47c1ec78b97c0e170c52397048d360cf2f3dbaf336b9ba3c7045407ef5ec7ecac208cbc06b572c25f005aebcd9230bf20d4c99d54e8576e7327f5c0e53e29e72" +sha256 = "b1f3cf7bed13568e831197ca6fb220229cf135e7bd2a1da4b26a0b2748248cda" +sha512 = "6afcbd6fe0c8feedaf735c0dd22f3fe6632c9cf4433d191669ee341b42c5964bb2041481ca78bdffa522eac307c79482d053abd763a8b61cc1dd336dc23b7d58" deps = ["io"] [random] diff --git a/tests/go/wasi/wit/deps/fib/fib.wit b/tests/go/wasi/wit/deps/fib/fib.wit index f621d77..8a133ce 100644 --- a/tests/go/wasi/wit/deps/fib/fib.wit +++ b/tests/go/wasi/wit/deps/fib/fib.wit @@ -1,4 +1,4 @@ -package west-test:fib; +package wadge-test:fib; interface fib { fib: func(n: u32) -> u64; diff --git a/tests/go/wasi/wit/deps/leftpad/leftpad.wit b/tests/go/wasi/wit/deps/leftpad/leftpad.wit index 1a137ff..d9048c7 100644 --- a/tests/go/wasi/wit/deps/leftpad/leftpad.wit +++ b/tests/go/wasi/wit/deps/leftpad/leftpad.wit @@ -1,4 +1,4 @@ -package west-test:leftpad; +package wadge-test:leftpad; interface leftpad { use wasi:io/streams@0.2.1.{input-stream, output-stream, stream-error}; diff --git a/tests/wit/fib/fib.wit b/tests/wit/fib/fib.wit index f621d77..8a133ce 100644 --- a/tests/wit/fib/fib.wit +++ b/tests/wit/fib/fib.wit @@ -1,4 +1,4 @@ -package west-test:fib; +package wadge-test:fib; interface fib { fib: func(n: u32) -> u64; diff --git a/tests/wit/leftpad/leftpad.wit b/tests/wit/leftpad/leftpad.wit index 1a137ff..d9048c7 100644 --- a/tests/wit/leftpad/leftpad.wit +++ b/tests/wit/leftpad/leftpad.wit @@ -1,4 +1,4 @@ -package west-test:leftpad; +package wadge-test:leftpad; interface leftpad { use wasi:io/streams@0.2.1.{input-stream, output-stream, stream-error}; diff --git a/tests/wit/sync/sync.wit b/tests/wit/sync/sync.wit index 214a2b1..6b7abe1 100644 --- a/tests/wit/sync/sync.wit +++ b/tests/wit/sync/sync.wit @@ -1,4 +1,4 @@ -package west-test:sync; +package wadge-test:sync; interface sync { flags abc { diff --git a/west.go b/wadge.go similarity index 98% rename from west.go rename to wadge.go index 8db9236..67fa74c 100644 --- a/west.go +++ b/wadge.go @@ -1,8 +1,8 @@ //go:generate cargo run -p generate-header -package west +package wadge -// #cgo LDFLAGS: -lwest +// #cgo LDFLAGS: -lwadge // #cgo android,arm64 LDFLAGS: -L${SRCDIR}/lib/aarch64-android // #cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/lib/x86_64-darwin // #cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/lib/aarch64-darwin @@ -13,7 +13,7 @@ package west // #cgo windows,arm64 LDFLAGS: -L${SRCDIR}/lib/aarch64-windows // #cgo !windows LDFLAGS: -lm -ldl -pthread // #cgo windows LDFLAGS: -lws2_32 -lole32 -loleaut32 -lntdll -lbcrypt -luserenv -// #include "./include/west.h" +// #include "./include/wadge.h" // #include import "C" diff --git a/westhttp/http.go b/wadgehttp/http.go similarity index 97% rename from westhttp/http.go rename to wadgehttp/http.go index a3a00e1..cdbfb6a 100644 --- a/westhttp/http.go +++ b/wadgehttp/http.go @@ -1,4 +1,4 @@ -package westhttp +package wadgehttp import ( "bytes" @@ -10,9 +10,9 @@ import ( "unsafe" "github.com/bytecodealliance/wasm-tools-go/cm" - "github.com/wasmCloud/west/bindings/wasi/http/types" - "github.com/wasmCloud/west/bindings/wasi/io/poll" - "github.com/wasmCloud/west/bindings/wasiext/http/ext" + "github.com/wasmCloud/wadge/bindings/wasi/http/types" + "github.com/wasmCloud/wadge/bindings/wasi/io/poll" + "github.com/wasmCloud/wadge/bindings/wasiext/http/ext" ) func NewFields(h http.Header) types.Fields { diff --git a/wit/west.wit b/wit/wadge.wit similarity index 77% rename from wit/west.wit rename to wit/wadge.wit index b0ad18e..a3640a8 100644 --- a/wit/west.wit +++ b/wit/wadge.wit @@ -1,4 +1,4 @@ -package west:west@0.1.0; +package wadge:wadge@0.1.0; world imports { include wasiext:http/imports@0.1.0;