diff --git a/examples/go/http/bindings/wasi/cli/environment/environment.wit.go b/examples/go/http/bindings/wasi/cli/environment/environment.wit.go index 19d95cf..48e066d 100644 --- a/examples/go/http/bindings/wasi/cli/environment/environment.wit.go +++ b/examples/go/http/bindings/wasi/cli/environment/environment.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package environment represents the imported interface "wasi:cli/environment@0.2.1". +// Package environment represents the imported interface "wasi:cli/environment@0.2.0". package environment import ( @@ -26,7 +26,7 @@ func GetEnvironment() (result cm.List[[2]string]) { return } -//go:wasmimport wasi:cli/environment@0.2.1 get-environment +//go:wasmimport wasi:cli/environment@0.2.0 get-environment //go:noescape func wasmimport_GetEnvironment(result *cm.List[[2]string]) @@ -42,7 +42,7 @@ func GetArguments() (result cm.List[string]) { return } -//go:wasmimport wasi:cli/environment@0.2.1 get-arguments +//go:wasmimport wasi:cli/environment@0.2.0 get-arguments //go:noescape func wasmimport_GetArguments(result *cm.List[string]) @@ -59,6 +59,6 @@ func InitialCWD() (result cm.Option[string]) { return } -//go:wasmimport wasi:cli/environment@0.2.1 initial-cwd +//go:wasmimport wasi:cli/environment@0.2.0 initial-cwd //go:noescape func wasmimport_InitialCWD(result *cm.Option[string]) diff --git a/examples/go/http/bindings/wasi/cli/exit/exit.wit.go b/examples/go/http/bindings/wasi/cli/exit/exit.wit.go index 7cf9449..3fccd93 100644 --- a/examples/go/http/bindings/wasi/cli/exit/exit.wit.go +++ b/examples/go/http/bindings/wasi/cli/exit/exit.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package exit represents the imported interface "wasi:cli/exit@0.2.1". +// Package exit represents the imported interface "wasi:cli/exit@0.2.0". package exit import ( @@ -20,30 +20,6 @@ func Exit(status cm.BoolResult) { return } -//go:wasmimport wasi:cli/exit@0.2.1 exit +//go:wasmimport wasi:cli/exit@0.2.0 exit //go:noescape func wasmimport_Exit(status0 uint32) - -// ExitWithCode represents the imported function "exit-with-code". -// -// Exit the current instance and any linked instances, reporting the -// specified status code to the host. -// -// The meaning of the code depends on the context, with 0 usually meaning -// "success", and other values indicating various types of failure. -// -// This function does not return; the effect is analogous to a trap, but -// without the connotation that something bad has happened. -// -// exit-with-code: func(status-code: u8) -// -//go:nosplit -func ExitWithCode(statusCode uint8) { - statusCode0 := (uint32)(statusCode) - wasmimport_ExitWithCode((uint32)(statusCode0)) - return -} - -//go:wasmimport wasi:cli/exit@0.2.1 exit-with-code -//go:noescape -func wasmimport_ExitWithCode(statusCode0 uint32) 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 5170768..e18a561 100644 --- a/examples/go/http/bindings/wasi/cli/stderr/stderr.wit.go +++ b/examples/go/http/bindings/wasi/cli/stderr/stderr.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package stderr represents the imported interface "wasi:cli/stderr@0.2.1". +// Package stderr represents the imported interface "wasi:cli/stderr@0.2.0". package stderr import ( @@ -19,6 +19,6 @@ func GetStderr() (result streams.OutputStream) { return } -//go:wasmimport wasi:cli/stderr@0.2.1 get-stderr +//go:wasmimport wasi:cli/stderr@0.2.0 get-stderr //go:noescape func wasmimport_GetStderr() (result0 uint32) 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 e5e44be..ce4d7e1 100644 --- a/examples/go/http/bindings/wasi/cli/stdin/stdin.wit.go +++ b/examples/go/http/bindings/wasi/cli/stdin/stdin.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package stdin represents the imported interface "wasi:cli/stdin@0.2.1". +// Package stdin represents the imported interface "wasi:cli/stdin@0.2.0". package stdin import ( @@ -19,6 +19,6 @@ func GetStdin() (result streams.InputStream) { return } -//go:wasmimport wasi:cli/stdin@0.2.1 get-stdin +//go:wasmimport wasi:cli/stdin@0.2.0 get-stdin //go:noescape func wasmimport_GetStdin() (result0 uint32) 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 1679c02..8c2da50 100644 --- a/examples/go/http/bindings/wasi/cli/stdout/stdout.wit.go +++ b/examples/go/http/bindings/wasi/cli/stdout/stdout.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package stdout represents the imported interface "wasi:cli/stdout@0.2.1". +// Package stdout represents the imported interface "wasi:cli/stdout@0.2.0". package stdout import ( @@ -19,6 +19,6 @@ func GetStdout() (result streams.OutputStream) { return } -//go:wasmimport wasi:cli/stdout@0.2.1 get-stdout +//go:wasmimport wasi:cli/stdout@0.2.0 get-stdout //go:noescape func wasmimport_GetStdout() (result0 uint32) diff --git a/examples/go/http/bindings/wasi/cli/terminal-input/terminal-input.wit.go b/examples/go/http/bindings/wasi/cli/terminal-input/terminal-input.wit.go index 42bf805..e0114e0 100644 --- a/examples/go/http/bindings/wasi/cli/terminal-input/terminal-input.wit.go +++ b/examples/go/http/bindings/wasi/cli/terminal-input/terminal-input.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package terminalinput represents the imported interface "wasi:cli/terminal-input@0.2.1". +// Package terminalinput represents the imported interface "wasi:cli/terminal-input@0.2.0". // // Terminal input. // @@ -13,7 +13,7 @@ import ( "github.com/bytecodealliance/wasm-tools-go/cm" ) -// TerminalInput represents the imported resource "wasi:cli/terminal-input@0.2.1#terminal-input". +// TerminalInput represents the imported resource "wasi:cli/terminal-input@0.2.0#terminal-input". // // The input side of a terminal. // @@ -31,6 +31,6 @@ func (self TerminalInput) ResourceDrop() { return } -//go:wasmimport wasi:cli/terminal-input@0.2.1 [resource-drop]terminal-input +//go:wasmimport wasi:cli/terminal-input@0.2.0 [resource-drop]terminal-input //go:noescape func wasmimport_TerminalInputResourceDrop(self0 uint32) diff --git a/examples/go/http/bindings/wasi/cli/terminal-output/terminal-output.wit.go b/examples/go/http/bindings/wasi/cli/terminal-output/terminal-output.wit.go index e266abc..a63b0e6 100644 --- a/examples/go/http/bindings/wasi/cli/terminal-output/terminal-output.wit.go +++ b/examples/go/http/bindings/wasi/cli/terminal-output/terminal-output.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package terminaloutput represents the imported interface "wasi:cli/terminal-output@0.2.1". +// Package terminaloutput represents the imported interface "wasi:cli/terminal-output@0.2.0". // // Terminal output. // @@ -13,7 +13,7 @@ import ( "github.com/bytecodealliance/wasm-tools-go/cm" ) -// TerminalOutput represents the imported resource "wasi:cli/terminal-output@0.2.1#terminal-output". +// TerminalOutput represents the imported resource "wasi:cli/terminal-output@0.2.0#terminal-output". // // The output side of a terminal. // @@ -31,6 +31,6 @@ func (self TerminalOutput) ResourceDrop() { return } -//go:wasmimport wasi:cli/terminal-output@0.2.1 [resource-drop]terminal-output +//go:wasmimport wasi:cli/terminal-output@0.2.0 [resource-drop]terminal-output //go:noescape func wasmimport_TerminalOutputResourceDrop(self0 uint32) 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 2cd716c..218d371 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package terminalstderr represents the imported interface "wasi:cli/terminal-stderr@0.2.1". +// Package terminalstderr represents the imported interface "wasi:cli/terminal-stderr@0.2.0". // // An interface providing an optional `terminal-output` for stderr as a // link-time authority. @@ -24,6 +24,6 @@ func GetTerminalStderr() (result cm.Option[terminaloutput.TerminalOutput]) { return } -//go:wasmimport wasi:cli/terminal-stderr@0.2.1 get-terminal-stderr +//go:wasmimport wasi:cli/terminal-stderr@0.2.0 get-terminal-stderr //go:noescape func wasmimport_GetTerminalStderr(result *cm.Option[terminaloutput.TerminalOutput]) 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 b922e0e..ff1b00d 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package terminalstdin represents the imported interface "wasi:cli/terminal-stdin@0.2.1". +// Package terminalstdin represents the imported interface "wasi:cli/terminal-stdin@0.2.0". // // An interface providing an optional `terminal-input` for stdin as a // link-time authority. @@ -24,6 +24,6 @@ func GetTerminalStdin() (result cm.Option[terminalinput.TerminalInput]) { return } -//go:wasmimport wasi:cli/terminal-stdin@0.2.1 get-terminal-stdin +//go:wasmimport wasi:cli/terminal-stdin@0.2.0 get-terminal-stdin //go:noescape func wasmimport_GetTerminalStdin(result *cm.Option[terminalinput.TerminalInput]) 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 f9273eb..7f4abfa 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package terminalstdout represents the imported interface "wasi:cli/terminal-stdout@0.2.1". +// Package terminalstdout represents the imported interface "wasi:cli/terminal-stdout@0.2.0". // // An interface providing an optional `terminal-output` for stdout as a // link-time authority. @@ -24,6 +24,6 @@ func GetTerminalStdout() (result cm.Option[terminaloutput.TerminalOutput]) { return } -//go:wasmimport wasi:cli/terminal-stdout@0.2.1 get-terminal-stdout +//go:wasmimport wasi:cli/terminal-stdout@0.2.0 get-terminal-stdout //go:noescape func wasmimport_GetTerminalStdout(result *cm.Option[terminaloutput.TerminalOutput]) 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 fc5c8f8..59c9c34 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package monotonicclock represents the imported interface "wasi:clocks/monotonic-clock@0.2.1". +// Package monotonicclock represents the imported interface "wasi:clocks/monotonic-clock@0.2.0". // // WASI Monotonic Clock is a clock API intended to let users measure elapsed // time. @@ -10,6 +10,8 @@ // // A monotonic clock is a clock which has an unspecified initial value, and // successive reads of the clock will produce non-decreasing values. +// +// It is intended for measuring elapsed time. package monotonicclock import ( @@ -17,7 +19,7 @@ import ( "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" ) -// Instant represents the u64 "wasi:clocks/monotonic-clock@0.2.1#instant". +// Instant represents the u64 "wasi:clocks/monotonic-clock@0.2.0#instant". // // An instant in time, in nanoseconds. An instant is relative to an // unspecified initial value, and can only be compared to instances from @@ -26,7 +28,7 @@ import ( // type instant = u64 type Instant uint64 -// Duration represents the u64 "wasi:clocks/monotonic-clock@0.2.1#duration". +// Duration represents the u64 "wasi:clocks/monotonic-clock@0.2.0#duration". // // A duration of time, in nanoseconds. // @@ -49,7 +51,7 @@ func Now() (result Instant) { return } -//go:wasmimport wasi:clocks/monotonic-clock@0.2.1 now +//go:wasmimport wasi:clocks/monotonic-clock@0.2.0 now //go:noescape func wasmimport_Now() (result0 uint64) @@ -67,14 +69,14 @@ func Resolution() (result Duration) { return } -//go:wasmimport wasi:clocks/monotonic-clock@0.2.1 resolution +//go:wasmimport wasi:clocks/monotonic-clock@0.2.0 resolution //go:noescape func wasmimport_Resolution() (result0 uint64) // SubscribeInstant represents the imported function "subscribe-instant". // // Create a `pollable` which will resolve once the specified instant -// has occurred. +// occured. // // subscribe-instant: func(when: instant) -> pollable // @@ -86,14 +88,15 @@ func SubscribeInstant(when Instant) (result poll.Pollable) { return } -//go:wasmimport wasi:clocks/monotonic-clock@0.2.1 subscribe-instant +//go:wasmimport wasi:clocks/monotonic-clock@0.2.0 subscribe-instant //go:noescape func wasmimport_SubscribeInstant(when0 uint64) (result0 uint32) // SubscribeDuration represents the imported function "subscribe-duration". // -// Create a `pollable` that will resolve after the specified duration has -// elapsed from the time this function is invoked. +// Create a `pollable` which will resolve once the given duration has +// elapsed, starting at the time at which this function was called. +// occured. // // subscribe-duration: func(when: duration) -> pollable // @@ -105,6 +108,6 @@ func SubscribeDuration(when Duration) (result poll.Pollable) { return } -//go:wasmimport wasi:clocks/monotonic-clock@0.2.1 subscribe-duration +//go:wasmimport wasi:clocks/monotonic-clock@0.2.0 subscribe-duration //go:noescape func wasmimport_SubscribeDuration(when0 uint64) (result0 uint32) diff --git a/examples/go/http/bindings/wasi/clocks/timezone/abi.go b/examples/go/http/bindings/wasi/clocks/timezone/abi.go deleted file mode 100644 index 93aefb2..0000000 --- a/examples/go/http/bindings/wasi/clocks/timezone/abi.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by wit-bindgen-go. DO NOT EDIT. - -package timezone - -import ( - wallclock "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/clocks/wall-clock" -) - -func lower_DateTime(v wallclock.DateTime) (f0 uint64, f1 uint32) { - f0 = (uint64)(v.Seconds) - f1 = (uint32)(v.Nanoseconds) - return -} diff --git a/examples/go/http/bindings/wasi/clocks/timezone/empty.s b/examples/go/http/bindings/wasi/clocks/timezone/empty.s deleted file mode 100644 index 5444f20..0000000 --- a/examples/go/http/bindings/wasi/clocks/timezone/empty.s +++ /dev/null @@ -1,3 +0,0 @@ -// This file exists for testing this package without WebAssembly, -// allowing empty function bodies with a //go:wasmimport directive. -// See https://pkg.go.dev/cmd/compile for more information. diff --git a/examples/go/http/bindings/wasi/clocks/timezone/timezone.wit.go b/examples/go/http/bindings/wasi/clocks/timezone/timezone.wit.go deleted file mode 100644 index fa0024a..0000000 --- a/examples/go/http/bindings/wasi/clocks/timezone/timezone.wit.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by wit-bindgen-go. DO NOT EDIT. - -// Package timezone represents the imported interface "wasi:clocks/timezone@0.2.1". -package timezone - -import ( - 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". -// -// Information useful for displaying the timezone of a specific `datetime`. -// -// This information may vary within a single `timezone` to reflect daylight -// saving time adjustments. -// -// record timezone-display { -// utc-offset: s32, -// name: string, -// in-daylight-saving-time: bool, -// } -type TimezoneDisplay struct { - // The number of seconds difference between UTC time and the local - // time of the timezone. - // - // The returned value will always be less than 86400 which is the - // number of seconds in a day (24*60*60). - // - // In implementations that do not expose an actual time zone, this - // should return 0. - UtcOffset int32 - - // The abbreviated name of the timezone to display to a user. The name - // `UTC` indicates Coordinated Universal Time. Otherwise, this should - // reference local standards for the name of the time zone. - // - // In implementations that do not expose an actual time zone, this - // should be the string `UTC`. - // - // In time zones that do not have an applicable name, a formatted - // representation of the UTC offset may be returned, such as `-04:00`. - Name string - - // Whether daylight saving time is active. - // - // In implementations that do not expose an actual time zone, this - // should return false. - InDaylightSavingTime bool -} - -// Display represents the imported function "display". -// -// Return information needed to display the given `datetime`. This includes -// the UTC offset, the time zone name, and a flag indicating whether -// daylight saving time is active. -// -// If the timezone cannot be determined for the given `datetime`, return a -// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight -// saving time. -// -// display: func(when: datetime) -> timezone-display -// -//go:nosplit -func Display(when wallclock.DateTime) (result TimezoneDisplay) { - when0, when1 := lower_DateTime(when) - wasmimport_Display((uint64)(when0), (uint32)(when1), &result) - return -} - -//go:wasmimport wasi:clocks/timezone@0.2.1 display -//go:noescape -func wasmimport_Display(when0 uint64, when1 uint32, result *TimezoneDisplay) - -// UtcOffset represents the imported function "utc-offset". -// -// The same as `display`, but only return the UTC offset. -// -// utc-offset: func(when: datetime) -> s32 -// -//go:nosplit -func UtcOffset(when wallclock.DateTime) (result int32) { - when0, when1 := lower_DateTime(when) - result0 := wasmimport_UtcOffset((uint64)(when0), (uint32)(when1)) - result = (int32)((uint32)(result0)) - return -} - -//go:wasmimport wasi:clocks/timezone@0.2.1 utc-offset -//go:noescape -func wasmimport_UtcOffset(when0 uint64, when1 uint32) (result0 uint32) diff --git a/examples/go/http/bindings/wasi/clocks/wall-clock/wall-clock.wit.go b/examples/go/http/bindings/wasi/clocks/wall-clock/wall-clock.wit.go index 20dd2bb..a59a313 100644 --- a/examples/go/http/bindings/wasi/clocks/wall-clock/wall-clock.wit.go +++ b/examples/go/http/bindings/wasi/clocks/wall-clock/wall-clock.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package wallclock represents the imported interface "wasi:clocks/wall-clock@0.2.1". +// Package wallclock represents the imported interface "wasi:clocks/wall-clock@0.2.0". // // WASI Wall Clock is a clock API intended to let users query the current // time. The name "wall" makes an analogy to a "clock on the wall", which @@ -18,7 +18,7 @@ // It is intended for reporting the current date and time for humans. package wallclock -// DateTime represents the record "wasi:clocks/wall-clock@0.2.1#datetime". +// DateTime represents the record "wasi:clocks/wall-clock@0.2.0#datetime". // // A time and date in seconds plus nanoseconds. // @@ -55,7 +55,7 @@ func Now() (result DateTime) { return } -//go:wasmimport wasi:clocks/wall-clock@0.2.1 now +//go:wasmimport wasi:clocks/wall-clock@0.2.0 now //go:noescape func wasmimport_Now(result *DateTime) @@ -73,6 +73,6 @@ func Resolution() (result DateTime) { return } -//go:wasmimport wasi:clocks/wall-clock@0.2.1 resolution +//go:wasmimport wasi:clocks/wall-clock@0.2.0 resolution //go:noescape func wasmimport_Resolution(result *DateTime) 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 bf1a506..43fac85 100644 --- a/examples/go/http/bindings/wasi/filesystem/preopens/preopens.wit.go +++ b/examples/go/http/bindings/wasi/filesystem/preopens/preopens.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package preopens represents the imported interface "wasi:filesystem/preopens@0.2.1". +// Package preopens represents the imported interface "wasi:filesystem/preopens@0.2.0". package preopens import ( @@ -20,6 +20,6 @@ func GetDirectories() (result cm.List[cm.Tuple[types.Descriptor, string]]) { return } -//go:wasmimport wasi:filesystem/preopens@0.2.1 get-directories +//go:wasmimport wasi:filesystem/preopens@0.2.0 get-directories //go:noescape func wasmimport_GetDirectories(result *cm.List[cm.Tuple[types.Descriptor, string]]) 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 ebabf2b..478c2ee 100644 --- a/examples/go/http/bindings/wasi/filesystem/types/types.wit.go +++ b/examples/go/http/bindings/wasi/filesystem/types/types.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package types represents the imported interface "wasi:filesystem/types@0.2.1". +// Package types represents the imported interface "wasi:filesystem/types@0.2.0". // // WASI filesystem is a filesystem API primarily intended to let users run WASI // programs that access their files on their existing filesystems, without @@ -35,14 +35,14 @@ import ( "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" ) -// FileSize represents the u64 "wasi:filesystem/types@0.2.1#filesize". +// FileSize represents the u64 "wasi:filesystem/types@0.2.0#filesize". // // File size or length of a region within a file. // // type filesize = u64 type FileSize uint64 -// DescriptorType represents the enum "wasi:filesystem/types@0.2.1#descriptor-type". +// DescriptorType represents the enum "wasi:filesystem/types@0.2.0#descriptor-type". // // The type of a filesystem object referenced by a descriptor. // @@ -103,7 +103,7 @@ func (e DescriptorType) String() string { return stringsDescriptorType[e] } -// DescriptorFlags represents the flags "wasi:filesystem/types@0.2.1#descriptor-flags". +// DescriptorFlags represents the flags "wasi:filesystem/types@0.2.0#descriptor-flags". // // Descriptor flags. // @@ -144,7 +144,7 @@ const ( // requirement. DescriptorFlagsDataIntegritySync - // Requests that reads be performed at the same level of integrity + // Requests that reads be performed at the same level of integrety // requested for writes. This is similar to `O_RSYNC` in POSIX. // // The precise semantics of this operation have not yet been defined for @@ -164,7 +164,7 @@ const ( DescriptorFlagsMutateDirectory ) -// PathFlags represents the flags "wasi:filesystem/types@0.2.1#path-flags". +// PathFlags represents the flags "wasi:filesystem/types@0.2.0#path-flags". // // Flags determining the method of how paths are resolved. // @@ -179,7 +179,7 @@ const ( PathFlagsSymlinkFollow PathFlags = 1 << iota ) -// OpenFlags represents the flags "wasi:filesystem/types@0.2.1#open-flags". +// OpenFlags represents the flags "wasi:filesystem/types@0.2.0#open-flags". // // Open flags used by `open-at`. // @@ -205,14 +205,14 @@ const ( OpenFlagsTruncate ) -// LinkCount represents the u64 "wasi:filesystem/types@0.2.1#link-count". +// LinkCount represents the u64 "wasi:filesystem/types@0.2.0#link-count". // // Number of hard links to an inode. // // type link-count = u64 type LinkCount uint64 -// DescriptorStat represents the record "wasi:filesystem/types@0.2.1#descriptor-stat". +// DescriptorStat represents the record "wasi:filesystem/types@0.2.0#descriptor-stat". // // File attributes. // @@ -256,7 +256,7 @@ type DescriptorStat struct { StatusChangeTimestamp cm.Option[wallclock.DateTime] } -// NewTimestamp represents the variant "wasi:filesystem/types@0.2.1#new-timestamp". +// NewTimestamp represents the variant "wasi:filesystem/types@0.2.0#new-timestamp". // // When setting a timestamp, this gives the value to set it to. // @@ -306,7 +306,7 @@ func (self *NewTimestamp) Timestamp() *wallclock.DateTime { return cm.Case[wallclock.DateTime](self, 2) } -// DirectoryEntry represents the record "wasi:filesystem/types@0.2.1#directory-entry". +// DirectoryEntry represents the record "wasi:filesystem/types@0.2.0#directory-entry". // // A directory entry. // @@ -322,7 +322,7 @@ type DirectoryEntry struct { Name string } -// ErrorCode represents the enum "wasi:filesystem/types@0.2.1#error-code". +// ErrorCode represents the enum "wasi:filesystem/types@0.2.0#error-code". // // Error codes returned by functions, similar to `errno` in POSIX. // Not all of these error codes are returned by the functions provided by this @@ -529,7 +529,7 @@ func (e ErrorCode) String() string { return stringsErrorCode[e] } -// Advice represents the enum "wasi:filesystem/types@0.2.1#advice". +// Advice represents the enum "wasi:filesystem/types@0.2.0#advice". // // File or memory access pattern advisory information. // @@ -583,7 +583,7 @@ func (e Advice) String() string { return stringsAdvice[e] } -// MetadataHashValue represents the record "wasi:filesystem/types@0.2.1#metadata-hash-value". +// MetadataHashValue represents the record "wasi:filesystem/types@0.2.0#metadata-hash-value". // // A 128-bit hash value, split into parts because wasm doesn't have a // 128-bit integer type. @@ -600,7 +600,7 @@ type MetadataHashValue struct { Upper uint64 } -// Descriptor represents the imported resource "wasi:filesystem/types@0.2.1#descriptor". +// Descriptor represents the imported resource "wasi:filesystem/types@0.2.0#descriptor". // // A descriptor is a reference to a filesystem object, which may be a file, // directory, named pipe, special file, or other object on which filesystem @@ -620,7 +620,7 @@ func (self Descriptor) ResourceDrop() { return } -//go:wasmimport wasi:filesystem/types@0.2.1 [resource-drop]descriptor +//go:wasmimport wasi:filesystem/types@0.2.0 [resource-drop]descriptor //go:noescape func wasmimport_DescriptorResourceDrop(self0 uint32) @@ -642,7 +642,7 @@ func (self Descriptor) Advise(offset FileSize, length FileSize, advice Advice) ( return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.advise +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.advise //go:noescape func wasmimport_DescriptorAdvise(self0 uint32, offset0 uint64, length0 uint64, advice0 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -664,7 +664,7 @@ func (self Descriptor) AppendViaStream() (result cm.Result[streams.OutputStream, return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.append-via-stream +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.append-via-stream //go:noescape func wasmimport_DescriptorAppendViaStream(self0 uint32, result *cm.Result[streams.OutputStream, streams.OutputStream, ErrorCode]) @@ -684,7 +684,7 @@ func (self Descriptor) CreateDirectoryAt(path string) (result cm.Result[ErrorCod return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.create-directory-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.create-directory-at //go:noescape func wasmimport_DescriptorCreateDirectoryAt(self0 uint32, path0 *uint8, path1 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -706,7 +706,7 @@ func (self Descriptor) GetFlags() (result cm.Result[DescriptorFlags, DescriptorF return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.get-flags +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.get-flags //go:noescape func wasmimport_DescriptorGetFlags(self0 uint32, result *cm.Result[DescriptorFlags, DescriptorFlags, ErrorCode]) @@ -732,7 +732,7 @@ func (self Descriptor) GetType() (result cm.Result[DescriptorType, DescriptorTyp return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.get-type +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.get-type //go:noescape func wasmimport_DescriptorGetType(self0 uint32, result *cm.Result[DescriptorType, DescriptorType, ErrorCode]) @@ -756,7 +756,7 @@ func (self Descriptor) IsSameObject(other Descriptor) (result bool) { return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.is-same-object +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.is-same-object //go:noescape func wasmimport_DescriptorIsSameObject(self0 uint32, other0 uint32) (result0 uint32) @@ -780,7 +780,7 @@ func (self Descriptor) LinkAt(oldPathFlags PathFlags, oldPath string, newDescrip return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.link-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.link-at //go:noescape func wasmimport_DescriptorLinkAt(self0 uint32, oldPathFlags0 uint32, oldPath0 *uint8, oldPath1 uint32, newDescriptor0 uint32, newPath0 *uint8, newPath1 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -815,7 +815,7 @@ func (self Descriptor) MetadataHash() (result cm.Result[MetadataHashValueShape, return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.metadata-hash +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.metadata-hash //go:noescape func wasmimport_DescriptorMetadataHash(self0 uint32, result *cm.Result[MetadataHashValueShape, MetadataHashValue, ErrorCode]) @@ -838,7 +838,7 @@ func (self Descriptor) MetadataHashAt(pathFlags PathFlags, path string) (result return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.metadata-hash-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.metadata-hash-at //go:noescape func wasmimport_DescriptorMetadataHashAt(self0 uint32, pathFlags0 uint32, path0 *uint8, path1 uint32, result *cm.Result[MetadataHashValueShape, MetadataHashValue, ErrorCode]) @@ -877,7 +877,7 @@ func (self Descriptor) OpenAt(pathFlags PathFlags, path string, openFlags OpenFl return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.open-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.open-at //go:noescape func wasmimport_DescriptorOpenAt(self0 uint32, pathFlags0 uint32, path0 *uint8, path1 uint32, openFlags0 uint32, flags0 uint32, result *cm.Result[Descriptor, Descriptor, ErrorCode]) @@ -907,7 +907,7 @@ func (self Descriptor) Read(length FileSize, offset FileSize) (result cm.Result[ return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.read +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.read //go:noescape func wasmimport_DescriptorRead(self0 uint32, length0 uint64, offset0 uint64, result *cm.Result[TupleListU8BoolShape, cm.Tuple[cm.List[uint8], bool], ErrorCode]) @@ -932,7 +932,7 @@ func (self Descriptor) ReadDirectory() (result cm.Result[DirectoryEntryStream, D return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.read-directory +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.read-directory //go:noescape func wasmimport_DescriptorReadDirectory(self0 uint32, result *cm.Result[DirectoryEntryStream, DirectoryEntryStream, ErrorCode]) @@ -957,7 +957,7 @@ func (self Descriptor) ReadViaStream(offset FileSize) (result cm.Result[streams. return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.read-via-stream +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.read-via-stream //go:noescape func wasmimport_DescriptorReadViaStream(self0 uint32, offset0 uint64, result *cm.Result[streams.InputStream, streams.InputStream, ErrorCode]) @@ -980,7 +980,7 @@ func (self Descriptor) ReadLinkAt(path string) (result cm.Result[string, string, return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.readlink-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.readlink-at //go:noescape func wasmimport_DescriptorReadLinkAt(self0 uint32, path0 *uint8, path1 uint32, result *cm.Result[string, string, ErrorCode]) @@ -1002,7 +1002,7 @@ func (self Descriptor) RemoveDirectoryAt(path string) (result cm.Result[ErrorCod return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.remove-directory-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.remove-directory-at //go:noescape func wasmimport_DescriptorRemoveDirectoryAt(self0 uint32, path0 *uint8, path1 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1025,7 +1025,7 @@ func (self Descriptor) RenameAt(oldPath string, newDescriptor Descriptor, newPat return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.rename-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.rename-at //go:noescape func wasmimport_DescriptorRenameAt(self0 uint32, oldPath0 *uint8, oldPath1 uint32, newDescriptor0 uint32, newPath0 *uint8, newPath1 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1046,7 +1046,7 @@ func (self Descriptor) SetSize(size FileSize) (result cm.Result[ErrorCode, struc return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.set-size +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.set-size //go:noescape func wasmimport_DescriptorSetSize(self0 uint32, size0 uint64, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1070,7 +1070,7 @@ func (self Descriptor) SetTimes(dataAccessTimestamp NewTimestamp, dataModificati return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.set-times +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.set-times //go:noescape func wasmimport_DescriptorSetTimes(self0 uint32, dataAccessTimestamp0 uint32, dataAccessTimestamp1 uint64, dataAccessTimestamp2 uint32, dataModificationTimestamp0 uint32, dataModificationTimestamp1 uint64, dataModificationTimestamp2 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1097,7 +1097,7 @@ func (self Descriptor) SetTimesAt(pathFlags PathFlags, path string, dataAccessTi return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.set-times-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.set-times-at //go:noescape func wasmimport_DescriptorSetTimesAt(self0 uint32, pathFlags0 uint32, path0 *uint8, path1 uint32, dataAccessTimestamp0 uint32, dataAccessTimestamp1 uint64, dataAccessTimestamp2 uint32, dataModificationTimestamp0 uint32, dataModificationTimestamp1 uint64, dataModificationTimestamp2 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1122,7 +1122,7 @@ func (self Descriptor) Stat() (result cm.Result[DescriptorStatShape, DescriptorS return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.stat +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.stat //go:noescape func wasmimport_DescriptorStat(self0 uint32, result *cm.Result[DescriptorStatShape, DescriptorStat, ErrorCode]) @@ -1148,7 +1148,7 @@ func (self Descriptor) StatAt(pathFlags PathFlags, path string) (result cm.Resul return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.stat-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.stat-at //go:noescape func wasmimport_DescriptorStatAt(self0 uint32, pathFlags0 uint32, path0 *uint8, path1 uint32, result *cm.Result[DescriptorStatShape, DescriptorStat, ErrorCode]) @@ -1172,7 +1172,7 @@ func (self Descriptor) SymlinkAt(oldPath string, newPath string) (result cm.Resu return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.symlink-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.symlink-at //go:noescape func wasmimport_DescriptorSymlinkAt(self0 uint32, oldPath0 *uint8, oldPath1 uint32, newPath0 *uint8, newPath1 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1194,7 +1194,7 @@ func (self Descriptor) Sync() (result cm.Result[ErrorCode, struct{}, ErrorCode]) return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.sync +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.sync //go:noescape func wasmimport_DescriptorSync(self0 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1216,7 +1216,7 @@ func (self Descriptor) SyncData() (result cm.Result[ErrorCode, struct{}, ErrorCo return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.sync-data +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.sync-data //go:noescape func wasmimport_DescriptorSyncData(self0 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1237,7 +1237,7 @@ func (self Descriptor) UnlinkFileAt(path string) (result cm.Result[ErrorCode, st return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.unlink-file-at +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.unlink-file-at //go:noescape func wasmimport_DescriptorUnlinkFileAt(self0 uint32, path0 *uint8, path1 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -1264,7 +1264,7 @@ func (self Descriptor) Write(buffer cm.List[uint8], offset FileSize) (result cm. return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.write +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.write //go:noescape func wasmimport_DescriptorWrite(self0 uint32, buffer0 *uint8, buffer1 uint32, offset0 uint64, result *cm.Result[uint64, FileSize, ErrorCode]) @@ -1287,11 +1287,11 @@ func (self Descriptor) WriteViaStream(offset FileSize) (result cm.Result[streams return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]descriptor.write-via-stream +//go:wasmimport wasi:filesystem/types@0.2.0 [method]descriptor.write-via-stream //go:noescape func wasmimport_DescriptorWriteViaStream(self0 uint32, offset0 uint64, result *cm.Result[streams.OutputStream, streams.OutputStream, ErrorCode]) -// DirectoryEntryStream represents the imported resource "wasi:filesystem/types@0.2.1#directory-entry-stream". +// DirectoryEntryStream represents the imported resource "wasi:filesystem/types@0.2.0#directory-entry-stream". // // A stream of directory entries. // @@ -1309,7 +1309,7 @@ func (self DirectoryEntryStream) ResourceDrop() { return } -//go:wasmimport wasi:filesystem/types@0.2.1 [resource-drop]directory-entry-stream +//go:wasmimport wasi:filesystem/types@0.2.0 [resource-drop]directory-entry-stream //go:noescape func wasmimport_DirectoryEntryStreamResourceDrop(self0 uint32) @@ -1326,7 +1326,7 @@ func (self DirectoryEntryStream) ReadDirectoryEntry() (result cm.Result[OptionDi return } -//go:wasmimport wasi:filesystem/types@0.2.1 [method]directory-entry-stream.read-directory-entry +//go:wasmimport wasi:filesystem/types@0.2.0 [method]directory-entry-stream.read-directory-entry //go:noescape func wasmimport_DirectoryEntryStreamReadDirectoryEntry(self0 uint32, result *cm.Result[OptionDirectoryEntryShape, cm.Option[DirectoryEntry], ErrorCode]) @@ -1352,6 +1352,6 @@ func FilesystemErrorCode(err ioerror.Error) (result cm.Option[ErrorCode]) { return } -//go:wasmimport wasi:filesystem/types@0.2.1 filesystem-error-code +//go:wasmimport wasi:filesystem/types@0.2.0 filesystem-error-code //go:noescape func wasmimport_FilesystemErrorCode(err0 uint32, result *cm.Option[ErrorCode]) 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 5f73131..38125d3 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 @@ -6,7 +6,7 @@ import ( "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". +// Exports represents the caller-defined exports from "wasi:http/incoming-handler@0.2.0". var Exports struct { // Handle represents the caller-defined, exported function "handle". // 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 e95d9fd..f327ef4 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package incominghandler represents the exported interface "wasi:http/incoming-handler@0.2.1". +// Package incominghandler represents the exported interface "wasi:http/incoming-handler@0.2.0". // // This interface defines a handler of incoming HTTP Requests. It should // be exported by components which can respond to HTTP Requests. @@ -11,8 +11,8 @@ import ( "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/http/types" ) -//go:wasmexport wasi:http/incoming-handler@0.2.1#handle -//export wasi:http/incoming-handler@0.2.1#handle +//go:wasmexport wasi:http/incoming-handler@0.2.0#handle +//export wasi:http/incoming-handler@0.2.0#handle func wasmexport_Handle(request0 uint32, responseOut0 uint32) { request := cm.Reinterpret[types.IncomingRequest]((uint32)(request0)) responseOut := cm.Reinterpret[types.ResponseOutparam]((uint32)(responseOut0)) 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 cd87207..f25db85 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package outgoinghandler represents the imported interface "wasi:http/outgoing-handler@0.2.1". +// Package outgoinghandler represents the imported interface "wasi:http/outgoing-handler@0.2.0". // // This interface defines a handler of outgoing HTTP Requests. It should be // imported by components which wish to make HTTP Requests. @@ -35,6 +35,6 @@ func Handle(request types.OutgoingRequest, options cm.Option[types.RequestOption return } -//go:wasmimport wasi:http/outgoing-handler@0.2.1 handle +//go:wasmimport wasi:http/outgoing-handler@0.2.0 handle //go:noescape func wasmimport_Handle(request0 uint32, options0 uint32, options1 uint32, result *cm.Result[ErrorCodeShape, types.FutureIncomingResponse, types.ErrorCode]) 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 2422ed1..b9f3fbe 100644 --- a/examples/go/http/bindings/wasi/http/types/types.wit.go +++ b/examples/go/http/bindings/wasi/http/types/types.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package types represents the imported interface "wasi:http/types@0.2.1". +// Package types represents the imported interface "wasi:http/types@0.2.0". // // This interface defines all of the types and methods for implementing // HTTP Requests and Responses, both incoming and outgoing, as well as @@ -15,7 +15,7 @@ import ( "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/streams" ) -// Method represents the variant "wasi:http/types@0.2.1#method". +// Method represents the variant "wasi:http/types@0.2.0#method". // // This type corresponds to HTTP standard Methods. // @@ -142,7 +142,7 @@ func (self *Method) Other() *string { return cm.Case[string](self, 9) } -// Scheme represents the variant "wasi:http/types@0.2.1#scheme". +// Scheme represents the variant "wasi:http/types@0.2.0#scheme". // // This type corresponds to HTTP standard Related Schemes. // @@ -185,7 +185,7 @@ func (self *Scheme) Other() *string { return cm.Case[string](self, 2) } -// DNSErrorPayload represents the record "wasi:http/types@0.2.1#DNS-error-payload". +// DNSErrorPayload represents the record "wasi:http/types@0.2.0#DNS-error-payload". // // Defines the case payload type for `DNS-error` above: // @@ -198,7 +198,7 @@ type DNSErrorPayload struct { InfoCode cm.Option[uint16] } -// TLSAlertReceivedPayload represents the record "wasi:http/types@0.2.1#TLS-alert-received-payload". +// TLSAlertReceivedPayload represents the record "wasi:http/types@0.2.0#TLS-alert-received-payload". // // Defines the case payload type for `TLS-alert-received` above: // @@ -211,7 +211,7 @@ type TLSAlertReceivedPayload struct { AlertMessage cm.Option[string] } -// FieldSizePayload represents the record "wasi:http/types@0.2.1#field-size-payload". +// FieldSizePayload represents the record "wasi:http/types@0.2.0#field-size-payload". // // Defines the case payload type for `HTTP-response-{header,trailer}-size` above: // @@ -224,7 +224,7 @@ type FieldSizePayload struct { FieldSize cm.Option[uint32] } -// ErrorCode represents the variant "wasi:http/types@0.2.1#error-code". +// ErrorCode represents the variant "wasi:http/types@0.2.0#error-code". // // These cases are inspired by the IANA HTTP Proxy Error Types: // https://www.iana.org/assignments/http-proxy-status/http-proxy-status.xhtml#table-http-proxy-error-types @@ -692,7 +692,7 @@ func (self *ErrorCode) InternalError() *cm.Option[string] { return cm.Case[cm.Option[string]](self, 38) } -// HeaderError represents the variant "wasi:http/types@0.2.1#header-error". +// HeaderError represents the variant "wasi:http/types@0.2.0#header-error". // // This type enumerates the different kinds of errors that may occur when // setting or appending to a `fields` resource. @@ -730,14 +730,14 @@ func (e HeaderError) String() string { return stringsHeaderError[e] } -// FieldKey represents the string "wasi:http/types@0.2.1#field-key". +// FieldKey represents the string "wasi:http/types@0.2.0#field-key". // // Field keys are always strings. // // type field-key = string type FieldKey string -// FieldValue represents the list "wasi:http/types@0.2.1#field-value". +// FieldValue represents the list "wasi:http/types@0.2.0#field-value". // // Field values should always be ASCII strings. However, in // reality, HTTP implementations often have to interpret malformed values, @@ -746,7 +746,7 @@ type FieldKey string // type field-value = list type FieldValue cm.List[uint8] -// Fields represents the imported resource "wasi:http/types@0.2.1#fields". +// Fields represents the imported resource "wasi:http/types@0.2.0#fields". // // This following block defines the `fields` resource which corresponds to // HTTP standard Fields. Fields are a common representation used for both @@ -773,7 +773,7 @@ func (self Fields) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]fields +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]fields //go:noescape func wasmimport_FieldsResourceDrop(self0 uint32) @@ -792,7 +792,7 @@ func NewFields() (result Fields) { return } -//go:wasmimport wasi:http/types@0.2.1 [constructor]fields +//go:wasmimport wasi:http/types@0.2.0 [constructor]fields //go:noescape func wasmimport_NewFields() (result0 uint32) @@ -807,10 +807,12 @@ func wasmimport_NewFields() (result0 uint32) // list with the same key. // // The tuple is a pair of the field key, represented as a string, and -// Value, represented as a list of bytes. +// Value, represented as a list of bytes. In a valid Fields, all keys +// and values are valid UTF-8 strings. However, values are not always +// well-formed, so they are represented as a raw list of bytes. // -// An error result will be returned if any `field-key` or `field-value` is -// syntactically invalid, or if a field is forbidden. +// An error result will be returned if any header or value was +// syntactically invalid, or if a header was forbidden. // // from-list: static func(entries: list>) -> result @@ -822,7 +824,7 @@ func FieldsFromList(entries cm.List[cm.Tuple[FieldKey, FieldValue]]) (result cm. return } -//go:wasmimport wasi:http/types@0.2.1 [static]fields.from-list +//go:wasmimport wasi:http/types@0.2.0 [static]fields.from-list //go:noescape func wasmimport_FieldsFromList(entries0 *cm.Tuple[FieldKey, FieldValue], entries1 uint32, result *cm.Result[Fields, Fields, HeaderError]) @@ -833,9 +835,6 @@ func wasmimport_FieldsFromList(entries0 *cm.Tuple[FieldKey, FieldValue], entries // // Fails with `header-error.immutable` if the `fields` are immutable. // -// Fails with `header-error.invalid-syntax` if the `field-key` or -// `field-value` are syntactically invalid. -// // append: func(name: field-key, value: field-value) -> result<_, header-error> // //go:nosplit @@ -847,13 +846,13 @@ func (self Fields) Append(name FieldKey, value FieldValue) (result cm.Result[Hea return } -//go:wasmimport wasi:http/types@0.2.1 [method]fields.append +//go:wasmimport wasi:http/types@0.2.0 [method]fields.append //go:noescape func wasmimport_FieldsAppend(self0 uint32, name0 *uint8, name1 uint32, value0 *uint8, value1 uint32, result *cm.Result[HeaderError, struct{}, HeaderError]) // Clone represents the imported method "clone". // -// Make a deep copy of the Fields. Equivalent in behavior to calling the +// Make a deep copy of the Fields. Equivelant in behavior to calling the // `fields` constructor on the return value of `entries`. The resulting // `fields` is mutable. // @@ -867,7 +866,7 @@ func (self Fields) Clone() (result Fields) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]fields.clone +//go:wasmimport wasi:http/types@0.2.0 [method]fields.clone //go:noescape func wasmimport_FieldsClone(self0 uint32) (result0 uint32) @@ -878,9 +877,6 @@ func wasmimport_FieldsClone(self0 uint32) (result0 uint32) // // Fails with `header-error.immutable` if the `fields` are immutable. // -// Fails with `header-error.invalid-syntax` if the `field-key` is -// syntactically invalid. -// // delete: func(name: field-key) -> result<_, header-error> // //go:nosplit @@ -891,7 +887,7 @@ func (self Fields) Delete(name FieldKey) (result cm.Result[HeaderError, struct{} return } -//go:wasmimport wasi:http/types@0.2.1 [method]fields.delete +//go:wasmimport wasi:http/types@0.2.0 [method]fields.delete //go:noescape func wasmimport_FieldsDelete(self0 uint32, name0 *uint8, name1 uint32, result *cm.Result[HeaderError, struct{}, HeaderError]) @@ -913,16 +909,16 @@ func (self Fields) Entries() (result cm.List[cm.Tuple[FieldKey, FieldValue]]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]fields.entries +//go:wasmimport wasi:http/types@0.2.0 [method]fields.entries //go:noescape func wasmimport_FieldsEntries(self0 uint32, result *cm.List[cm.Tuple[FieldKey, FieldValue]]) // Get represents the imported method "get". // // Get all of the values corresponding to a key. If the key is not present -// in this `fields` or is syntactically invalid, an empty list is returned. -// However, if the key is present but empty, this is represented by a list -// with one or more empty field-values present. +// in this `fields`, an empty list is returned. However, if the key is +// present but empty, this is represented by a list with one or more +// empty field-values present. // // get: func(name: field-key) -> list // @@ -934,7 +930,7 @@ func (self Fields) Get(name FieldKey) (result cm.List[FieldValue]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]fields.get +//go:wasmimport wasi:http/types@0.2.0 [method]fields.get //go:noescape func wasmimport_FieldsGet(self0 uint32, name0 *uint8, name1 uint32, result *cm.List[FieldValue]) @@ -954,7 +950,7 @@ func (self Fields) Has(name FieldKey) (result bool) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]fields.has +//go:wasmimport wasi:http/types@0.2.0 [method]fields.has //go:noescape func wasmimport_FieldsHas(self0 uint32, name0 *uint8, name1 uint32) (result0 uint32) @@ -965,9 +961,6 @@ func wasmimport_FieldsHas(self0 uint32, name0 *uint8, name1 uint32) (result0 uin // // Fails with `header-error.immutable` if the `fields` are immutable. // -// Fails with `header-error.invalid-syntax` if the `field-key` or any of -// the `field-value`s are syntactically invalid. -// // set: func(name: field-key, value: list) -> result<_, header-error> // //go:nosplit @@ -979,11 +972,11 @@ func (self Fields) Set(name FieldKey, value cm.List[FieldValue]) (result cm.Resu return } -//go:wasmimport wasi:http/types@0.2.1 [method]fields.set +//go:wasmimport wasi:http/types@0.2.0 [method]fields.set //go:noescape func wasmimport_FieldsSet(self0 uint32, name0 *uint8, name1 uint32, value0 *FieldValue, value1 uint32, result *cm.Result[HeaderError, struct{}, HeaderError]) -// IncomingRequest represents the imported resource "wasi:http/types@0.2.1#incoming-request". +// IncomingRequest represents the imported resource "wasi:http/types@0.2.0#incoming-request". // // Represents an incoming HTTP Request. // @@ -1001,13 +994,13 @@ func (self IncomingRequest) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]incoming-request +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]incoming-request //go:noescape func wasmimport_IncomingRequestResourceDrop(self0 uint32) // Authority represents the imported method "authority". // -// Returns the authority of the Request's target URI, if present. +// Returns the authority from the request, if it was present. // // authority: func() -> option // @@ -1018,7 +1011,7 @@ func (self IncomingRequest) Authority() (result cm.Option[string]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-request.authority +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-request.authority //go:noescape func wasmimport_IncomingRequestAuthority(self0 uint32, result *cm.Option[string]) @@ -1036,7 +1029,7 @@ func (self IncomingRequest) Consume() (result cm.Result[IncomingBody, IncomingBo return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-request.consume +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-request.consume //go:noescape func wasmimport_IncomingRequestConsume(self0 uint32, result *cm.Result[IncomingBody, IncomingBody, struct{}]) @@ -1061,7 +1054,7 @@ func (self IncomingRequest) Headers() (result Fields) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-request.headers +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-request.headers //go:noescape func wasmimport_IncomingRequestHeaders(self0 uint32) (result0 uint32) @@ -1078,7 +1071,7 @@ func (self IncomingRequest) Method() (result Method) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-request.method +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-request.method //go:noescape func wasmimport_IncomingRequestMethod(self0 uint32, result *Method) @@ -1095,7 +1088,7 @@ func (self IncomingRequest) PathWithQuery() (result cm.Option[string]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-request.path-with-query +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-request.path-with-query //go:noescape func wasmimport_IncomingRequestPathWithQuery(self0 uint32, result *cm.Option[string]) @@ -1112,11 +1105,11 @@ func (self IncomingRequest) Scheme() (result cm.Option[Scheme]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-request.scheme +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-request.scheme //go:noescape func wasmimport_IncomingRequestScheme(self0 uint32, result *cm.Option[Scheme]) -// OutgoingRequest represents the imported resource "wasi:http/types@0.2.1#outgoing-request". +// OutgoingRequest represents the imported resource "wasi:http/types@0.2.0#outgoing-request". // // Represents an outgoing HTTP Request. // @@ -1134,7 +1127,7 @@ func (self OutgoingRequest) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]outgoing-request +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]outgoing-request //go:noescape func wasmimport_OutgoingRequestResourceDrop(self0 uint32) @@ -1161,14 +1154,14 @@ func NewOutgoingRequest(headers Fields) (result OutgoingRequest) { return } -//go:wasmimport wasi:http/types@0.2.1 [constructor]outgoing-request +//go:wasmimport wasi:http/types@0.2.0 [constructor]outgoing-request //go:noescape func wasmimport_NewOutgoingRequest(headers0 uint32) (result0 uint32) // Authority represents the imported method "authority". // -// Get the authority of the Request's target URI. A value of `none` may be used -// with Related Schemes which do not require an authority. The HTTP and +// Get the HTTP Authority for the Request. A value of `none` may be used +// with Related Schemes which do not require an Authority. The HTTP and // HTTPS schemes always require an authority. // // authority: func() -> option @@ -1180,7 +1173,7 @@ func (self OutgoingRequest) Authority() (result cm.Option[string]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.authority +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.authority //go:noescape func wasmimport_OutgoingRequestAuthority(self0 uint32, result *cm.Option[string]) @@ -1202,7 +1195,7 @@ func (self OutgoingRequest) Body() (result cm.Result[OutgoingBody, OutgoingBody, return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.body +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.body //go:noescape func wasmimport_OutgoingRequestBody(self0 uint32, result *cm.Result[OutgoingBody, OutgoingBody, struct{}]) @@ -1214,7 +1207,7 @@ func wasmimport_OutgoingRequestBody(self0 uint32, result *cm.Result[OutgoingBody // `delete` operations will fail with `header-error.immutable`. // // This headers resource is a child: it must be dropped before the parent -// `outgoing-request` is dropped, or its ownership is transferred to +// `outgoing-request` is dropped, or its ownership is transfered to // another component by e.g. `outgoing-handler.handle`. // // headers: func() -> headers @@ -1227,7 +1220,7 @@ func (self OutgoingRequest) Headers() (result Fields) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.headers +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.headers //go:noescape func wasmimport_OutgoingRequestHeaders(self0 uint32) (result0 uint32) @@ -1244,7 +1237,7 @@ func (self OutgoingRequest) Method() (result Method) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.method +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.method //go:noescape func wasmimport_OutgoingRequestMethod(self0 uint32, result *Method) @@ -1262,7 +1255,7 @@ func (self OutgoingRequest) PathWithQuery() (result cm.Option[string]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.path-with-query +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.path-with-query //go:noescape func wasmimport_OutgoingRequestPathWithQuery(self0 uint32, result *cm.Option[string]) @@ -1280,16 +1273,16 @@ func (self OutgoingRequest) Scheme() (result cm.Option[Scheme]) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.scheme +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.scheme //go:noescape func wasmimport_OutgoingRequestScheme(self0 uint32, result *cm.Option[Scheme]) // SetAuthority represents the imported method "set-authority". // -// Set the authority of the Request's target URI. A value of `none` may be used -// with Related Schemes which do not require an authority. The HTTP and +// Set the HTTP Authority for the Request. A value of `none` may be used +// with Related Schemes which do not require an Authority. The HTTP and // HTTPS schemes always require an authority. Fails if the string given is -// not a syntactically valid URI authority. +// not a syntactically valid uri authority. // // set-authority: func(authority: option) -> result // @@ -1302,7 +1295,7 @@ func (self OutgoingRequest) SetAuthority(authority cm.Option[string]) (result cm return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.set-authority +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.set-authority //go:noescape func wasmimport_OutgoingRequestSetAuthority(self0 uint32, authority0 uint32, authority1 *uint8, authority2 uint32) (result0 uint32) @@ -1322,7 +1315,7 @@ func (self OutgoingRequest) SetMethod(method Method) (result cm.BoolResult) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.set-method +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.set-method //go:noescape func wasmimport_OutgoingRequestSetMethod(self0 uint32, method0 uint32, method1 *uint8, method2 uint32) (result0 uint32) @@ -1343,7 +1336,7 @@ func (self OutgoingRequest) SetPathWithQuery(pathWithQuery cm.Option[string]) (r return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.set-path-with-query +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.set-path-with-query //go:noescape func wasmimport_OutgoingRequestSetPathWithQuery(self0 uint32, pathWithQuery0 uint32, pathWithQuery1 *uint8, pathWithQuery2 uint32) (result0 uint32) @@ -1364,11 +1357,11 @@ func (self OutgoingRequest) SetScheme(scheme cm.Option[Scheme]) (result cm.BoolR return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-request.set-scheme +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-request.set-scheme //go:noescape func wasmimport_OutgoingRequestSetScheme(self0 uint32, scheme0 uint32, scheme1 uint32, scheme2 *uint8, scheme3 uint32) (result0 uint32) -// RequestOptions represents the imported resource "wasi:http/types@0.2.1#request-options". +// RequestOptions represents the imported resource "wasi:http/types@0.2.0#request-options". // // Parameters for making an HTTP Request. Each of these parameters is // currently an optional timeout applicable to the transport layer of the @@ -1391,7 +1384,7 @@ func (self RequestOptions) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]request-options +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]request-options //go:noescape func wasmimport_RequestOptionsResourceDrop(self0 uint32) @@ -1408,7 +1401,7 @@ func NewRequestOptions() (result RequestOptions) { return } -//go:wasmimport wasi:http/types@0.2.1 [constructor]request-options +//go:wasmimport wasi:http/types@0.2.0 [constructor]request-options //go:noescape func wasmimport_NewRequestOptions() (result0 uint32) @@ -1426,7 +1419,7 @@ func (self RequestOptions) BetweenBytesTimeout() (result cm.Option[monotoniccloc return } -//go:wasmimport wasi:http/types@0.2.1 [method]request-options.between-bytes-timeout +//go:wasmimport wasi:http/types@0.2.0 [method]request-options.between-bytes-timeout //go:noescape func wasmimport_RequestOptionsBetweenBytesTimeout(self0 uint32, result *cm.Option[monotonicclock.Duration]) @@ -1443,7 +1436,7 @@ func (self RequestOptions) ConnectTimeout() (result cm.Option[monotonicclock.Dur return } -//go:wasmimport wasi:http/types@0.2.1 [method]request-options.connect-timeout +//go:wasmimport wasi:http/types@0.2.0 [method]request-options.connect-timeout //go:noescape func wasmimport_RequestOptionsConnectTimeout(self0 uint32, result *cm.Option[monotonicclock.Duration]) @@ -1460,7 +1453,7 @@ func (self RequestOptions) FirstByteTimeout() (result cm.Option[monotonicclock.D return } -//go:wasmimport wasi:http/types@0.2.1 [method]request-options.first-byte-timeout +//go:wasmimport wasi:http/types@0.2.0 [method]request-options.first-byte-timeout //go:noescape func wasmimport_RequestOptionsFirstByteTimeout(self0 uint32, result *cm.Option[monotonicclock.Duration]) @@ -1481,7 +1474,7 @@ func (self RequestOptions) SetBetweenBytesTimeout(duration cm.Option[monotoniccl return } -//go:wasmimport wasi:http/types@0.2.1 [method]request-options.set-between-bytes-timeout +//go:wasmimport wasi:http/types@0.2.0 [method]request-options.set-between-bytes-timeout //go:noescape func wasmimport_RequestOptionsSetBetweenBytesTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) @@ -1501,7 +1494,7 @@ func (self RequestOptions) SetConnectTimeout(duration cm.Option[monotonicclock.D return } -//go:wasmimport wasi:http/types@0.2.1 [method]request-options.set-connect-timeout +//go:wasmimport wasi:http/types@0.2.0 [method]request-options.set-connect-timeout //go:noescape func wasmimport_RequestOptionsSetConnectTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) @@ -1521,11 +1514,11 @@ func (self RequestOptions) SetFirstByteTimeout(duration cm.Option[monotonicclock return } -//go:wasmimport wasi:http/types@0.2.1 [method]request-options.set-first-byte-timeout +//go:wasmimport wasi:http/types@0.2.0 [method]request-options.set-first-byte-timeout //go:noescape func wasmimport_RequestOptionsSetFirstByteTimeout(self0 uint32, duration0 uint32, duration1 uint64) (result0 uint32) -// ResponseOutparam represents the imported resource "wasi:http/types@0.2.1#response-outparam". +// ResponseOutparam represents the imported resource "wasi:http/types@0.2.0#response-outparam". // // Represents the ability to send an HTTP Response. // @@ -1547,7 +1540,7 @@ func (self ResponseOutparam) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]response-outparam +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]response-outparam //go:noescape func wasmimport_ResponseOutparamResourceDrop(self0 uint32) @@ -1574,18 +1567,18 @@ func ResponseOutparamSet(param ResponseOutparam, response cm.Result[ErrorCodeSha return } -//go:wasmimport wasi:http/types@0.2.1 [static]response-outparam.set +//go:wasmimport wasi:http/types@0.2.0 [static]response-outparam.set //go:noescape func wasmimport_ResponseOutparamSet(param0 uint32, response0 uint32, response1 uint32, response2 uint32, response3 uint64, response4 uint32, response5 uint32, response6 uint32, response7 uint32) -// StatusCode represents the u16 "wasi:http/types@0.2.1#status-code". +// StatusCode represents the u16 "wasi:http/types@0.2.0#status-code". // // This type corresponds to the HTTP standard Status Code. // // type status-code = u16 type StatusCode uint16 -// IncomingResponse represents the imported resource "wasi:http/types@0.2.1#incoming-response". +// IncomingResponse represents the imported resource "wasi:http/types@0.2.0#incoming-response". // // Represents an incoming HTTP Response. // @@ -1603,7 +1596,7 @@ func (self IncomingResponse) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]incoming-response +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]incoming-response //go:noescape func wasmimport_IncomingResponseResourceDrop(self0 uint32) @@ -1621,7 +1614,7 @@ func (self IncomingResponse) Consume() (result cm.Result[IncomingBody, IncomingB return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-response.consume +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-response.consume //go:noescape func wasmimport_IncomingResponseConsume(self0 uint32, result *cm.Result[IncomingBody, IncomingBody, struct{}]) @@ -1645,7 +1638,7 @@ func (self IncomingResponse) Headers() (result Fields) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-response.headers +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-response.headers //go:noescape func wasmimport_IncomingResponseHeaders(self0 uint32) (result0 uint32) @@ -1663,11 +1656,11 @@ func (self IncomingResponse) Status() (result StatusCode) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-response.status +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-response.status //go:noescape func wasmimport_IncomingResponseStatus(self0 uint32) (result0 uint32) -// IncomingBody represents the imported resource "wasi:http/types@0.2.1#incoming-body". +// IncomingBody represents the imported resource "wasi:http/types@0.2.0#incoming-body". // // Represents an incoming HTTP Request or Response's Body. // @@ -1692,7 +1685,7 @@ func (self IncomingBody) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]incoming-body +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]incoming-body //go:noescape func wasmimport_IncomingBodyResourceDrop(self0 uint32) @@ -1711,7 +1704,7 @@ func IncomingBodyFinish(this IncomingBody) (result FutureTrailers) { return } -//go:wasmimport wasi:http/types@0.2.1 [static]incoming-body.finish +//go:wasmimport wasi:http/types@0.2.0 [static]incoming-body.finish //go:noescape func wasmimport_IncomingBodyFinish(this0 uint32) (result0 uint32) @@ -1742,13 +1735,13 @@ func (self IncomingBody) Stream() (result cm.Result[streams.InputStream, streams return } -//go:wasmimport wasi:http/types@0.2.1 [method]incoming-body.stream +//go:wasmimport wasi:http/types@0.2.0 [method]incoming-body.stream //go:noescape func wasmimport_IncomingBodyStream(self0 uint32, result *cm.Result[streams.InputStream, streams.InputStream, struct{}]) -// FutureTrailers represents the imported resource "wasi:http/types@0.2.1#future-trailers". +// FutureTrailers represents the imported resource "wasi:http/types@0.2.0#future-trailers". // -// Represents a future which may eventually return trailers, or an error. +// Represents a future which may eventaully return trailers, or an error. // // In the case that the incoming HTTP Request or Response did not have any // trailers, this future will resolve to the empty set of trailers once the @@ -1768,13 +1761,13 @@ func (self FutureTrailers) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]future-trailers +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]future-trailers //go:noescape func wasmimport_FutureTrailersResourceDrop(self0 uint32) // Get represents the imported method "get". // -// Returns the contents of the trailers, or an error which occurred, +// Returns the contents of the trailers, or an error which occured, // once the future is ready. // // The outer `option` represents future readiness. Users can wait on this @@ -1786,7 +1779,7 @@ func wasmimport_FutureTrailersResourceDrop(self0 uint32) // // The inner `result` represents that either the HTTP Request or Response // body, as well as any trailers, were received successfully, or that an -// error occurred receiving them. The optional `trailers` indicates whether +// error occured receiving them. The optional `trailers` indicates whether // or not trailers were present in the body. // // When some `trailers` are returned by this method, the `trailers` @@ -1803,14 +1796,14 @@ func (self FutureTrailers) Get() (result cm.Option[cm.Result[cm.Result[ErrorCode return } -//go:wasmimport wasi:http/types@0.2.1 [method]future-trailers.get +//go:wasmimport wasi:http/types@0.2.0 [method]future-trailers.get //go:noescape func wasmimport_FutureTrailersGet(self0 uint32, result *cm.Option[cm.Result[cm.Result[ErrorCodeShape, cm.Option[Fields], ErrorCode], cm.Result[ErrorCodeShape, cm.Option[Fields], ErrorCode], struct{}]]) // Subscribe represents the imported method "subscribe". // // Returns a pollable which becomes ready when either the trailers have -// been received, or an error has occurred. When this pollable is ready, +// been received, or an error has occured. When this pollable is ready, // the `get` method will return `some`. // // subscribe: func() -> pollable @@ -1823,11 +1816,11 @@ func (self FutureTrailers) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]future-trailers.subscribe +//go:wasmimport wasi:http/types@0.2.0 [method]future-trailers.subscribe //go:noescape func wasmimport_FutureTrailersSubscribe(self0 uint32) (result0 uint32) -// OutgoingResponse represents the imported resource "wasi:http/types@0.2.1#outgoing-response". +// OutgoingResponse represents the imported resource "wasi:http/types@0.2.0#outgoing-response". // // Represents an outgoing HTTP Response. // @@ -1845,7 +1838,7 @@ func (self OutgoingResponse) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]outgoing-response +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]outgoing-response //go:noescape func wasmimport_OutgoingResponseResourceDrop(self0 uint32) @@ -1867,7 +1860,7 @@ func NewOutgoingResponse(headers Fields) (result OutgoingResponse) { return } -//go:wasmimport wasi:http/types@0.2.1 [constructor]outgoing-response +//go:wasmimport wasi:http/types@0.2.0 [constructor]outgoing-response //go:noescape func wasmimport_NewOutgoingResponse(headers0 uint32) (result0 uint32) @@ -1888,7 +1881,7 @@ func (self OutgoingResponse) Body() (result cm.Result[OutgoingBody, OutgoingBody return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-response.body +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-response.body //go:noescape func wasmimport_OutgoingResponseBody(self0 uint32, result *cm.Result[OutgoingBody, OutgoingBody, struct{}]) @@ -1900,7 +1893,7 @@ func wasmimport_OutgoingResponseBody(self0 uint32, result *cm.Result[OutgoingBod // `delete` operations will fail with `header-error.immutable`. // // This headers resource is a child: it must be dropped before the parent -// `outgoing-request` is dropped, or its ownership is transferred to +// `outgoing-request` is dropped, or its ownership is transfered to // another component by e.g. `outgoing-handler.handle`. // // headers: func() -> headers @@ -1913,7 +1906,7 @@ func (self OutgoingResponse) Headers() (result Fields) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-response.headers +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-response.headers //go:noescape func wasmimport_OutgoingResponseHeaders(self0 uint32) (result0 uint32) @@ -1933,7 +1926,7 @@ func (self OutgoingResponse) SetStatusCode(statusCode StatusCode) (result cm.Boo return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-response.set-status-code +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-response.set-status-code //go:noescape func wasmimport_OutgoingResponseSetStatusCode(self0 uint32, statusCode0 uint32) (result0 uint32) @@ -1951,11 +1944,11 @@ func (self OutgoingResponse) StatusCode() (result StatusCode) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-response.status-code +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-response.status-code //go:noescape func wasmimport_OutgoingResponseStatusCode(self0 uint32) (result0 uint32) -// OutgoingBody represents the imported resource "wasi:http/types@0.2.1#outgoing-body". +// OutgoingBody represents the imported resource "wasi:http/types@0.2.0#outgoing-body". // // Represents an outgoing HTTP Request or Response's Body. // @@ -1969,7 +1962,7 @@ func wasmimport_OutgoingResponseStatusCode(self0 uint32) (result0 uint32) // // If the user code drops this resource, as opposed to calling the static // method `finish`, the implementation should treat the body as incomplete, -// and that an error has occurred. The implementation should propagate this +// and that an error has occured. The implementation should propogate this // error to the HTTP protocol by whatever means it has available, // including: corrupting the body on the wire, aborting the associated // Request, or sending a late status code for the Response. @@ -1988,7 +1981,7 @@ func (self OutgoingBody) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]outgoing-body +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]outgoing-body //go:noescape func wasmimport_OutgoingBodyResourceDrop(self0 uint32) @@ -2015,7 +2008,7 @@ func OutgoingBodyFinish(this OutgoingBody, trailers cm.Option[Fields]) (result c return } -//go:wasmimport wasi:http/types@0.2.1 [static]outgoing-body.finish +//go:wasmimport wasi:http/types@0.2.0 [static]outgoing-body.finish //go:noescape func wasmimport_OutgoingBodyFinish(this0 uint32, trailers0 uint32, trailers1 uint32, result *cm.Result[ErrorCode, struct{}, ErrorCode]) @@ -2040,13 +2033,13 @@ func (self OutgoingBody) Write() (result cm.Result[streams.OutputStream, streams return } -//go:wasmimport wasi:http/types@0.2.1 [method]outgoing-body.write +//go:wasmimport wasi:http/types@0.2.0 [method]outgoing-body.write //go:noescape func wasmimport_OutgoingBodyWrite(self0 uint32, result *cm.Result[streams.OutputStream, streams.OutputStream, struct{}]) -// FutureIncomingResponse represents the imported resource "wasi:http/types@0.2.1#future-incoming-response". +// FutureIncomingResponse represents the imported resource "wasi:http/types@0.2.0#future-incoming-response". // -// Represents a future which may eventually return an incoming HTTP +// Represents a future which may eventaully return an incoming HTTP // Response, or an error. // // This resource is returned by the `wasi:http/outgoing-handler` interface to @@ -2066,7 +2059,7 @@ func (self FutureIncomingResponse) ResourceDrop() { return } -//go:wasmimport wasi:http/types@0.2.1 [resource-drop]future-incoming-response +//go:wasmimport wasi:http/types@0.2.0 [resource-drop]future-incoming-response //go:noescape func wasmimport_FutureIncomingResponseResourceDrop(self0 uint32) @@ -2082,8 +2075,8 @@ func wasmimport_FutureIncomingResponseResourceDrop(self0 uint32) // is `some`, and error on subsequent calls. // // The inner `result` represents that either the incoming HTTP Response -// status and headers have received successfully, or that an error -// occurred. Errors may also occur while consuming the response body, +// status and headers have recieved successfully, or that an error +// occured. Errors may also occur while consuming the response body, // but those will be reported by the `incoming-body` and its // `output-stream` child. // @@ -2096,14 +2089,14 @@ func (self FutureIncomingResponse) Get() (result cm.Option[cm.Result[cm.Result[E return } -//go:wasmimport wasi:http/types@0.2.1 [method]future-incoming-response.get +//go:wasmimport wasi:http/types@0.2.0 [method]future-incoming-response.get //go:noescape func wasmimport_FutureIncomingResponseGet(self0 uint32, result *cm.Option[cm.Result[cm.Result[ErrorCodeShape, IncomingResponse, ErrorCode], cm.Result[ErrorCodeShape, IncomingResponse, ErrorCode], struct{}]]) // Subscribe represents the imported method "subscribe". // // Returns a pollable which becomes ready when either the Response has -// been received, or an error has occurred. When this pollable is ready, +// been received, or an error has occured. When this pollable is ready, // the `get` method will return `some`. // // subscribe: func() -> pollable @@ -2116,7 +2109,7 @@ func (self FutureIncomingResponse) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:http/types@0.2.1 [method]future-incoming-response.subscribe +//go:wasmimport wasi:http/types@0.2.0 [method]future-incoming-response.subscribe //go:noescape func wasmimport_FutureIncomingResponseSubscribe(self0 uint32) (result0 uint32) @@ -2143,6 +2136,6 @@ func HTTPErrorCode(err ioerror.Error) (result cm.Option[ErrorCode]) { return } -//go:wasmimport wasi:http/types@0.2.1 http-error-code +//go:wasmimport wasi:http/types@0.2.0 http-error-code //go:noescape func wasmimport_HTTPErrorCode(err0 uint32, result *cm.Option[ErrorCode]) diff --git a/examples/go/http/bindings/wasi/io/error/error.wit.go b/examples/go/http/bindings/wasi/io/error/error.wit.go index 9571a52..61d61db 100644 --- a/examples/go/http/bindings/wasi/io/error/error.wit.go +++ b/examples/go/http/bindings/wasi/io/error/error.wit.go @@ -1,13 +1,13 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package ioerror represents the imported interface "wasi:io/error@0.2.1". +// Package ioerror represents the imported interface "wasi:io/error@0.2.0". package ioerror import ( "github.com/bytecodealliance/wasm-tools-go/cm" ) -// Error represents the imported resource "wasi:io/error@0.2.1#error". +// Error represents the imported resource "wasi:io/error@0.2.0#error". // // A resource which represents some error information. // @@ -18,11 +18,13 @@ import ( // `wasi:io/streams/stream-error` type. // // To provide more specific error information, other interfaces may -// offer functions to "downcast" this error into more specific types. For example, -// errors returned from streams derived from filesystem types can be described using -// the filesystem's own error-code type. This is done using the function -// `wasi:filesystem/types/filesystem-error-code`, which takes a `borrow` -// parameter and returns an `option`. +// provide functions to further "downcast" this error into more specific +// error information. For example, `error`s returned in streams derived +// from filesystem types to be described using the filesystem's own +// error-code type, using the function +// `wasi:filesystem/types/filesystem-error-code`, which takes a parameter +// `borrow` and returns +// `option`. // // The set of functions which can "downcast" an `error` into a more // concrete type is open. @@ -41,7 +43,7 @@ func (self Error) ResourceDrop() { return } -//go:wasmimport wasi:io/error@0.2.1 [resource-drop]error +//go:wasmimport wasi:io/error@0.2.0 [resource-drop]error //go:noescape func wasmimport_ErrorResourceDrop(self0 uint32) @@ -64,6 +66,6 @@ func (self Error) ToDebugString() (result string) { return } -//go:wasmimport wasi:io/error@0.2.1 [method]error.to-debug-string +//go:wasmimport wasi:io/error@0.2.0 [method]error.to-debug-string //go:noescape func wasmimport_ErrorToDebugString(self0 uint32, result *string) diff --git a/examples/go/http/bindings/wasi/io/poll/poll.wit.go b/examples/go/http/bindings/wasi/io/poll/poll.wit.go index 89ed0b9..d11852f 100644 --- a/examples/go/http/bindings/wasi/io/poll/poll.wit.go +++ b/examples/go/http/bindings/wasi/io/poll/poll.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package poll represents the imported interface "wasi:io/poll@0.2.1". +// Package poll represents the imported interface "wasi:io/poll@0.2.0". // // A poll API intended to let users wait for I/O events on multiple handles // at once. @@ -10,7 +10,7 @@ import ( "github.com/bytecodealliance/wasm-tools-go/cm" ) -// Pollable represents the imported resource "wasi:io/poll@0.2.1#pollable". +// Pollable represents the imported resource "wasi:io/poll@0.2.0#pollable". // // `pollable` represents a single I/O event which may be ready, or not. // @@ -28,7 +28,7 @@ func (self Pollable) ResourceDrop() { return } -//go:wasmimport wasi:io/poll@0.2.1 [resource-drop]pollable +//go:wasmimport wasi:io/poll@0.2.0 [resource-drop]pollable //go:noescape func wasmimport_PollableResourceDrop(self0 uint32) @@ -49,7 +49,7 @@ func (self Pollable) Block() { return } -//go:wasmimport wasi:io/poll@0.2.1 [method]pollable.block +//go:wasmimport wasi:io/poll@0.2.0 [method]pollable.block //go:noescape func wasmimport_PollableBlock(self0 uint32) @@ -69,7 +69,7 @@ func (self Pollable) Ready() (result bool) { return } -//go:wasmimport wasi:io/poll@0.2.1 [method]pollable.ready +//go:wasmimport wasi:io/poll@0.2.0 [method]pollable.ready //go:noescape func wasmimport_PollableReady(self0 uint32) (result0 uint32) @@ -83,9 +83,8 @@ func wasmimport_PollableReady(self0 uint32) (result0 uint32) // The result `list` contains one or more indices of handles in the // argument list that is ready for I/O. // -// This function traps if either: -// - the list is empty, or: -// - the list contains more elements than can be indexed with a `u32` value. +// If the list contains more elements than can be indexed with a `u32` +// value, this function traps. // // A timeout can be implemented by adding a pollable from the // wasi-clocks API to the list. @@ -93,7 +92,7 @@ func wasmimport_PollableReady(self0 uint32) (result0 uint32) // This function does not return a `result`; polling in itself does not // do any I/O so it doesn't fail. If any of the I/O sources identified by // the pollables has an error, it is indicated by marking the source as -// being ready for I/O. +// being reaedy for I/O. // // poll: func(in: list>) -> list // @@ -104,6 +103,6 @@ func Poll(in cm.List[Pollable]) (result cm.List[uint32]) { return } -//go:wasmimport wasi:io/poll@0.2.1 poll +//go:wasmimport wasi:io/poll@0.2.0 poll //go:noescape func wasmimport_Poll(in0 *Pollable, in1 uint32, result *cm.List[uint32]) 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 2a06d81..58078fb 100644 --- a/examples/go/http/bindings/wasi/io/streams/streams.wit.go +++ b/examples/go/http/bindings/wasi/io/streams/streams.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package streams represents the imported interface "wasi:io/streams@0.2.1". +// Package streams represents the imported interface "wasi:io/streams@0.2.0". // // WASI I/O is an I/O abstraction API which is currently focused on providing // stream types. @@ -15,7 +15,7 @@ import ( "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/io/poll" ) -// StreamError represents the imported variant "wasi:io/streams@0.2.1#stream-error". +// StreamError represents the imported variant "wasi:io/streams@0.2.0#stream-error". // // An error for input-stream and output-stream operations. // @@ -54,7 +54,7 @@ func (self *StreamError) Closed() bool { return self.Tag() == 1 } -// InputStream represents the imported resource "wasi:io/streams@0.2.1#input-stream". +// InputStream represents the imported resource "wasi:io/streams@0.2.0#input-stream". // // An input bytestream. // @@ -79,7 +79,7 @@ func (self InputStream) ResourceDrop() { return } -//go:wasmimport wasi:io/streams@0.2.1 [resource-drop]input-stream +//go:wasmimport wasi:io/streams@0.2.0 [resource-drop]input-stream //go:noescape func wasmimport_InputStreamResourceDrop(self0 uint32) @@ -98,7 +98,7 @@ func (self InputStream) BlockingRead(len_ uint64) (result cm.Result[cm.List[uint return } -//go:wasmimport wasi:io/streams@0.2.1 [method]input-stream.blocking-read +//go:wasmimport wasi:io/streams@0.2.0 [method]input-stream.blocking-read //go:noescape func wasmimport_InputStreamBlockingRead(self0 uint32, len0 uint64, result *cm.Result[cm.List[uint8], cm.List[uint8], StreamError]) @@ -117,7 +117,7 @@ func (self InputStream) BlockingSkip(len_ uint64) (result cm.Result[uint64, uint return } -//go:wasmimport wasi:io/streams@0.2.1 [method]input-stream.blocking-skip +//go:wasmimport wasi:io/streams@0.2.0 [method]input-stream.blocking-skip //go:noescape func wasmimport_InputStreamBlockingSkip(self0 uint32, len0 uint64, result *cm.Result[uint64, uint64, StreamError]) @@ -160,7 +160,7 @@ func (self InputStream) Read(len_ uint64) (result cm.Result[cm.List[uint8], cm.L return } -//go:wasmimport wasi:io/streams@0.2.1 [method]input-stream.read +//go:wasmimport wasi:io/streams@0.2.0 [method]input-stream.read //go:noescape func wasmimport_InputStreamRead(self0 uint32, len0 uint64, result *cm.Result[cm.List[uint8], cm.List[uint8], StreamError]) @@ -181,7 +181,7 @@ func (self InputStream) Skip(len_ uint64) (result cm.Result[uint64, uint64, Stre return } -//go:wasmimport wasi:io/streams@0.2.1 [method]input-stream.skip +//go:wasmimport wasi:io/streams@0.2.0 [method]input-stream.skip //go:noescape func wasmimport_InputStreamSkip(self0 uint32, len0 uint64, result *cm.Result[uint64, uint64, StreamError]) @@ -204,11 +204,11 @@ func (self InputStream) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:io/streams@0.2.1 [method]input-stream.subscribe +//go:wasmimport wasi:io/streams@0.2.0 [method]input-stream.subscribe //go:noescape func wasmimport_InputStreamSubscribe(self0 uint32) (result0 uint32) -// OutputStream represents the imported resource "wasi:io/streams@0.2.1#output-stream". +// OutputStream represents the imported resource "wasi:io/streams@0.2.0#output-stream". // // An output bytestream. // @@ -219,10 +219,6 @@ func wasmimport_InputStreamSubscribe(self0 uint32) (result0 uint32) // accept data, the `subscribe` function to obtain a `pollable` which can be // polled for using `wasi:io/poll`. // -// Dropping an `output-stream` while there's still an active write in -// progress may result in the data being lost. Before dropping the stream, -// be sure to fully flush your writes. -// // resource output-stream type OutputStream cm.Resource @@ -237,7 +233,7 @@ func (self OutputStream) ResourceDrop() { return } -//go:wasmimport wasi:io/streams@0.2.1 [resource-drop]output-stream +//go:wasmimport wasi:io/streams@0.2.0 [resource-drop]output-stream //go:noescape func wasmimport_OutputStreamResourceDrop(self0 uint32) @@ -255,7 +251,7 @@ func (self OutputStream) BlockingFlush() (result cm.Result[StreamError, struct{} return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.blocking-flush +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.blocking-flush //go:noescape func wasmimport_OutputStreamBlockingFlush(self0 uint32, result *cm.Result[StreamError, struct{}, StreamError]) @@ -278,7 +274,7 @@ func (self OutputStream) BlockingSplice(src InputStream, len_ uint64) (result cm return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.blocking-splice +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.blocking-splice //go:noescape func wasmimport_OutputStreamBlockingSplice(self0 uint32, src0 uint32, len0 uint64, result *cm.Result[uint64, uint64, StreamError]) @@ -317,7 +313,7 @@ func (self OutputStream) BlockingWriteAndFlush(contents cm.List[uint8]) (result return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.blocking-write-and-flush +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.blocking-write-and-flush //go:noescape func wasmimport_OutputStreamBlockingWriteAndFlush(self0 uint32, contents0 *uint8, contents1 uint32, result *cm.Result[StreamError, struct{}, StreamError]) @@ -356,7 +352,7 @@ func (self OutputStream) BlockingWriteZeroesAndFlush(len_ uint64) (result cm.Res return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.blocking-write-zeroes-and-flush +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.blocking-write-zeroes-and-flush //go:noescape func wasmimport_OutputStreamBlockingWriteZeroesAndFlush(self0 uint32, len0 uint64, result *cm.Result[StreamError, struct{}, StreamError]) @@ -381,7 +377,7 @@ func (self OutputStream) CheckWrite() (result cm.Result[uint64, uint64, StreamEr return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.check-write +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.check-write //go:noescape func wasmimport_OutputStreamCheckWrite(self0 uint32, result *cm.Result[uint64, uint64, StreamError]) @@ -407,7 +403,7 @@ func (self OutputStream) Flush() (result cm.Result[StreamError, struct{}, Stream return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.flush +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.flush //go:noescape func wasmimport_OutputStreamFlush(self0 uint32, result *cm.Result[StreamError, struct{}, StreamError]) @@ -415,7 +411,7 @@ func wasmimport_OutputStreamFlush(self0 uint32, result *cm.Result[StreamError, s // // Read from one stream and write to another. // -// The behavior of splice is equivalent to: +// The behavior of splice is equivelant to: // 1. calling `check-write` on the `output-stream` // 2. calling `read` on the `input-stream` with the smaller of the // `check-write` permitted length and the `len` provided to `splice` @@ -438,14 +434,14 @@ func (self OutputStream) Splice(src InputStream, len_ uint64) (result cm.Result[ return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.splice +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.splice //go:noescape func wasmimport_OutputStreamSplice(self0 uint32, src0 uint32, len0 uint64, result *cm.Result[uint64, uint64, StreamError]) // Subscribe represents the imported method "subscribe". // // Create a `pollable` which will resolve once the output-stream -// is ready for more writing, or an error has occurred. When this +// is ready for more writing, or an error has occured. When this // pollable is ready, `check-write` will return `ok(n)` with n>0, or an // error. // @@ -465,7 +461,7 @@ func (self OutputStream) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.subscribe +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.subscribe //go:noescape func wasmimport_OutputStreamSubscribe(self0 uint32) (result0 uint32) @@ -495,7 +491,7 @@ func (self OutputStream) Write(contents cm.List[uint8]) (result cm.Result[Stream return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.write +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.write //go:noescape func wasmimport_OutputStreamWrite(self0 uint32, contents0 *uint8, contents1 uint32, result *cm.Result[StreamError, struct{}, StreamError]) @@ -518,6 +514,6 @@ func (self OutputStream) WriteZeroes(len_ uint64) (result cm.Result[StreamError, return } -//go:wasmimport wasi:io/streams@0.2.1 [method]output-stream.write-zeroes +//go:wasmimport wasi:io/streams@0.2.0 [method]output-stream.write-zeroes //go:noescape func wasmimport_OutputStreamWriteZeroes(self0 uint32, len0 uint64, result *cm.Result[StreamError, struct{}, StreamError]) diff --git a/examples/go/http/bindings/wasi/random/insecure-seed/insecure-seed.wit.go b/examples/go/http/bindings/wasi/random/insecure-seed/insecure-seed.wit.go index fa25a3b..3b8f33c 100644 --- a/examples/go/http/bindings/wasi/random/insecure-seed/insecure-seed.wit.go +++ b/examples/go/http/bindings/wasi/random/insecure-seed/insecure-seed.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package insecureseed represents the imported interface "wasi:random/insecure-seed@0.2.1". +// Package insecureseed represents the imported interface "wasi:random/insecure-seed@0.2.0". // // The insecure-seed interface for seeding hash-map DoS resistance. // @@ -36,6 +36,6 @@ func InsecureSeed() (result [2]uint64) { return } -//go:wasmimport wasi:random/insecure-seed@0.2.1 insecure-seed +//go:wasmimport wasi:random/insecure-seed@0.2.0 insecure-seed //go:noescape func wasmimport_InsecureSeed(result *[2]uint64) diff --git a/examples/go/http/bindings/wasi/random/insecure/insecure.wit.go b/examples/go/http/bindings/wasi/random/insecure/insecure.wit.go index 6235f33..bfe1e6c 100644 --- a/examples/go/http/bindings/wasi/random/insecure/insecure.wit.go +++ b/examples/go/http/bindings/wasi/random/insecure/insecure.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package insecure represents the imported interface "wasi:random/insecure@0.2.1". +// Package insecure represents the imported interface "wasi:random/insecure@0.2.0". // // The insecure interface for insecure pseudo-random numbers. // @@ -32,7 +32,7 @@ func GetInsecureRandomBytes(len_ uint64) (result cm.List[uint8]) { return } -//go:wasmimport wasi:random/insecure@0.2.1 get-insecure-random-bytes +//go:wasmimport wasi:random/insecure@0.2.0 get-insecure-random-bytes //go:noescape func wasmimport_GetInsecureRandomBytes(len0 uint64, result *cm.List[uint8]) @@ -52,6 +52,6 @@ func GetInsecureRandomU64() (result uint64) { return } -//go:wasmimport wasi:random/insecure@0.2.1 get-insecure-random-u64 +//go:wasmimport wasi:random/insecure@0.2.0 get-insecure-random-u64 //go:noescape func wasmimport_GetInsecureRandomU64() (result0 uint64) diff --git a/examples/go/http/bindings/wasi/random/random/random.wit.go b/examples/go/http/bindings/wasi/random/random/random.wit.go index fbdbdb2..da2eb57 100644 --- a/examples/go/http/bindings/wasi/random/random/random.wit.go +++ b/examples/go/http/bindings/wasi/random/random/random.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package random represents the imported interface "wasi:random/random@0.2.1". +// Package random represents the imported interface "wasi:random/random@0.2.0". // // WASI Random is a random data API. // @@ -36,7 +36,7 @@ func GetRandomBytes(len_ uint64) (result cm.List[uint8]) { return } -//go:wasmimport wasi:random/random@0.2.1 get-random-bytes +//go:wasmimport wasi:random/random@0.2.0 get-random-bytes //go:noescape func wasmimport_GetRandomBytes(len0 uint64, result *cm.List[uint8]) @@ -56,6 +56,6 @@ func GetRandomU64() (result uint64) { return } -//go:wasmimport wasi:random/random@0.2.1 get-random-u64 +//go:wasmimport wasi:random/random@0.2.0 get-random-u64 //go:noescape func wasmimport_GetRandomU64() (result0 uint64) 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 4fcd572..1866bb1 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package instancenetwork represents the imported interface "wasi:sockets/instance-network@0.2.1". +// Package instancenetwork represents the imported interface "wasi:sockets/instance-network@0.2.0". // // This interface provides a value-export of the default network handle.. package instancenetwork @@ -23,6 +23,6 @@ func InstanceNetwork() (result network.Network) { return } -//go:wasmimport wasi:sockets/instance-network@0.2.1 instance-network +//go:wasmimport wasi:sockets/instance-network@0.2.0 instance-network //go:noescape func wasmimport_InstanceNetwork() (result0 uint32) 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 ac54ac6..716c9bd 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package ipnamelookup represents the imported interface "wasi:sockets/ip-name-lookup@0.2.1". +// Package ipnamelookup represents the imported interface "wasi:sockets/ip-name-lookup@0.2.0". package ipnamelookup import ( @@ -9,7 +9,7 @@ import ( "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". +// ResolveAddressStream represents the imported resource "wasi:sockets/ip-name-lookup@0.2.0#resolve-address-stream". // // resource resolve-address-stream type ResolveAddressStream cm.Resource @@ -25,7 +25,7 @@ func (self ResolveAddressStream) ResourceDrop() { return } -//go:wasmimport wasi:sockets/ip-name-lookup@0.2.1 [resource-drop]resolve-address-stream +//go:wasmimport wasi:sockets/ip-name-lookup@0.2.0 [resource-drop]resolve-address-stream //go:noescape func wasmimport_ResolveAddressStreamResourceDrop(self0 uint32) @@ -57,7 +57,7 @@ func (self ResolveAddressStream) ResolveNextAddress() (result cm.Result[OptionIP return } -//go:wasmimport wasi:sockets/ip-name-lookup@0.2.1 [method]resolve-address-stream.resolve-next-address +//go:wasmimport wasi:sockets/ip-name-lookup@0.2.0 [method]resolve-address-stream.resolve-next-address //go:noescape func wasmimport_ResolveAddressStreamResolveNextAddress(self0 uint32, result *cm.Result[OptionIPAddressShape, cm.Option[network.IPAddress], network.ErrorCode]) @@ -78,7 +78,7 @@ func (self ResolveAddressStream) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:sockets/ip-name-lookup@0.2.1 [method]resolve-address-stream.subscribe +//go:wasmimport wasi:sockets/ip-name-lookup@0.2.0 [method]resolve-address-stream.subscribe //go:noescape func wasmimport_ResolveAddressStreamSubscribe(self0 uint32) (result0 uint32) @@ -116,6 +116,6 @@ func ResolveAddresses(network_ network.Network, name string) (result cm.Result[R return } -//go:wasmimport wasi:sockets/ip-name-lookup@0.2.1 resolve-addresses +//go:wasmimport wasi:sockets/ip-name-lookup@0.2.0 resolve-addresses //go:noescape func wasmimport_ResolveAddresses(network0 uint32, name0 *uint8, name1 uint32, result *cm.Result[ResolveAddressStream, ResolveAddressStream, network.ErrorCode]) diff --git a/examples/go/http/bindings/wasi/sockets/network/network.wit.go b/examples/go/http/bindings/wasi/sockets/network/network.wit.go index 7d55115..b18bec9 100644 --- a/examples/go/http/bindings/wasi/sockets/network/network.wit.go +++ b/examples/go/http/bindings/wasi/sockets/network/network.wit.go @@ -1,13 +1,13 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package network represents the imported interface "wasi:sockets/network@0.2.1". +// Package network represents the imported interface "wasi:sockets/network@0.2.0". package network import ( "github.com/bytecodealliance/wasm-tools-go/cm" ) -// Network represents the imported resource "wasi:sockets/network@0.2.1#network". +// Network represents the imported resource "wasi:sockets/network@0.2.0#network". // // An opaque resource that represents access to (a subset of) the network. // This enables context-based security for networking. @@ -27,11 +27,11 @@ func (self Network) ResourceDrop() { return } -//go:wasmimport wasi:sockets/network@0.2.1 [resource-drop]network +//go:wasmimport wasi:sockets/network@0.2.0 [resource-drop]network //go:noescape func wasmimport_NetworkResourceDrop(self0 uint32) -// ErrorCode represents the enum "wasi:sockets/network@0.2.1#error-code". +// ErrorCode represents the enum "wasi:sockets/network@0.2.0#error-code". // // Error codes. // @@ -186,7 +186,7 @@ func (e ErrorCode) String() string { return stringsErrorCode[e] } -// IPAddressFamily represents the enum "wasi:sockets/network@0.2.1#ip-address-family". +// IPAddressFamily represents the enum "wasi:sockets/network@0.2.0#ip-address-family". // // enum ip-address-family { // ipv4, @@ -212,17 +212,17 @@ func (e IPAddressFamily) String() string { return stringsIPAddressFamily[e] } -// IPv4Address represents the tuple "wasi:sockets/network@0.2.1#ipv4-address". +// IPv4Address represents the tuple "wasi:sockets/network@0.2.0#ipv4-address". // // type ipv4-address = tuple type IPv4Address [4]uint8 -// IPv6Address represents the tuple "wasi:sockets/network@0.2.1#ipv6-address". +// IPv6Address represents the tuple "wasi:sockets/network@0.2.0#ipv6-address". // // type ipv6-address = tuple type IPv6Address [8]uint16 -// IPAddress represents the variant "wasi:sockets/network@0.2.1#ip-address". +// IPAddress represents the variant "wasi:sockets/network@0.2.0#ip-address". // // variant ip-address { // ipv4(ipv4-address), @@ -250,7 +250,7 @@ func (self *IPAddress) IPv6() *IPv6Address { return cm.Case[IPv6Address](self, 1) } -// IPv4SocketAddress represents the record "wasi:sockets/network@0.2.1#ipv4-socket-address". +// IPv4SocketAddress represents the record "wasi:sockets/network@0.2.0#ipv4-socket-address". // // record ipv4-socket-address { // port: u16, @@ -264,7 +264,7 @@ type IPv4SocketAddress struct { Address IPv4Address } -// IPv6SocketAddress represents the record "wasi:sockets/network@0.2.1#ipv6-socket-address". +// IPv6SocketAddress represents the record "wasi:sockets/network@0.2.0#ipv6-socket-address". // // record ipv6-socket-address { // port: u16, @@ -286,7 +286,7 @@ type IPv6SocketAddress struct { ScopeID uint32 } -// IPSocketAddress represents the variant "wasi:sockets/network@0.2.1#ip-socket-address". +// IPSocketAddress represents the variant "wasi:sockets/network@0.2.0#ip-socket-address". // // variant ip-socket-address { // ipv4(ipv4-socket-address), 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 780d075..87f8c9d 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package tcpcreatesocket represents the imported interface "wasi:sockets/tcp-create-socket@0.2.1". +// Package tcpcreatesocket represents the imported interface "wasi:sockets/tcp-create-socket@0.2.0". package tcpcreatesocket import ( @@ -47,6 +47,6 @@ func CreateTCPSocket(addressFamily network.IPAddressFamily) (result cm.Result[tc return } -//go:wasmimport wasi:sockets/tcp-create-socket@0.2.1 create-tcp-socket +//go:wasmimport wasi:sockets/tcp-create-socket@0.2.0 create-tcp-socket //go:noescape func wasmimport_CreateTCPSocket(addressFamily0 uint32, result *cm.Result[tcp.TCPSocket, tcp.TCPSocket, network.ErrorCode]) 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 10182e8..38a54e4 100644 --- a/examples/go/http/bindings/wasi/sockets/tcp/tcp.wit.go +++ b/examples/go/http/bindings/wasi/sockets/tcp/tcp.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package tcp represents the imported interface "wasi:sockets/tcp@0.2.1". +// Package tcp represents the imported interface "wasi:sockets/tcp@0.2.0". package tcp import ( @@ -11,7 +11,7 @@ import ( "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" ) -// ShutdownType represents the enum "wasi:sockets/tcp@0.2.1#shutdown-type". +// ShutdownType represents the enum "wasi:sockets/tcp@0.2.0#shutdown-type". // // enum shutdown-type { // receive, @@ -42,7 +42,7 @@ func (e ShutdownType) String() string { return stringsShutdownType[e] } -// TCPSocket represents the imported resource "wasi:sockets/tcp@0.2.1#tcp-socket". +// TCPSocket represents the imported resource "wasi:sockets/tcp@0.2.0#tcp-socket". // // A TCP socket resource. // @@ -55,8 +55,8 @@ func (e ShutdownType) String() string { // - `connect-in-progress` // - `connected` // - `closed` -// See -// for more information. +// See +// for a more information. // // Note: Except where explicitly mentioned, whenever this documentation uses // the term "bound" without backticks it actually means: in the `bound` state *or @@ -81,7 +81,7 @@ func (self TCPSocket) ResourceDrop() { return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [resource-drop]tcp-socket +//go:wasmimport wasi:sockets/tcp@0.2.0 [resource-drop]tcp-socket //go:noescape func wasmimport_TCPSocketResourceDrop(self0 uint32) @@ -126,7 +126,7 @@ func (self TCPSocket) Accept() (result cm.Result[TupleTCPSocketInputStreamOutput return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.accept +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.accept //go:noescape func wasmimport_TCPSocketAccept(self0 uint32, result *cm.Result[TupleTCPSocketInputStreamOutputStreamShape, cm.Tuple3[TCPSocket, streams.InputStream, streams.OutputStream], network.ErrorCode]) @@ -146,7 +146,7 @@ func (self TCPSocket) AddressFamily() (result network.IPAddressFamily) { return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.address-family +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.address-family //go:noescape func wasmimport_TCPSocketAddressFamily(self0 uint32) (result0 uint32) @@ -161,7 +161,7 @@ func (self TCPSocket) FinishBind() (result cm.Result[network.ErrorCode, struct{} return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.finish-bind +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.finish-bind //go:noescape func wasmimport_TCPSocketFinishBind(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -176,7 +176,7 @@ func (self TCPSocket) FinishConnect() (result cm.Result[TupleInputStreamOutputSt return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.finish-connect +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.finish-connect //go:noescape func wasmimport_TCPSocketFinishConnect(self0 uint32, result *cm.Result[TupleInputStreamOutputStreamShape, cm.Tuple[streams.InputStream, streams.OutputStream], network.ErrorCode]) @@ -191,7 +191,7 @@ func (self TCPSocket) FinishListen() (result cm.Result[network.ErrorCode, struct return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.finish-listen +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.finish-listen //go:noescape func wasmimport_TCPSocketFinishListen(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -213,7 +213,7 @@ func (self TCPSocket) HopLimit() (result cm.Result[uint8, uint8, network.ErrorCo return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.hop-limit +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.hop-limit //go:noescape func wasmimport_TCPSocketHopLimit(self0 uint32, result *cm.Result[uint8, uint8, network.ErrorCode]) @@ -233,7 +233,7 @@ func (self TCPSocket) IsListening() (result bool) { return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.is-listening +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.is-listening //go:noescape func wasmimport_TCPSocketIsListening(self0 uint32) (result0 uint32) @@ -261,7 +261,7 @@ func (self TCPSocket) KeepAliveCount() (result cm.Result[uint32, uint32, network return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.keep-alive-count +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-count //go:noescape func wasmimport_TCPSocketKeepAliveCount(self0 uint32, result *cm.Result[uint32, uint32, network.ErrorCode]) @@ -287,7 +287,7 @@ func (self TCPSocket) KeepAliveEnabled() (result cm.Result[bool, bool, network.E return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.keep-alive-enabled +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-enabled //go:noescape func wasmimport_TCPSocketKeepAliveEnabled(self0 uint32, result *cm.Result[bool, bool, network.ErrorCode]) @@ -316,7 +316,7 @@ func (self TCPSocket) KeepAliveIdleTime() (result cm.Result[uint64, monotonicclo return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.keep-alive-idle-time +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-idle-time //go:noescape func wasmimport_TCPSocketKeepAliveIdleTime(self0 uint32, result *cm.Result[uint64, monotonicclock.Duration, network.ErrorCode]) @@ -344,7 +344,7 @@ func (self TCPSocket) KeepAliveInterval() (result cm.Result[uint64, monotonicclo return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.keep-alive-interval +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-interval //go:noescape func wasmimport_TCPSocketKeepAliveInterval(self0 uint32, result *cm.Result[uint64, monotonicclock.Duration, network.ErrorCode]) @@ -377,7 +377,7 @@ func (self TCPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, net return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.local-address +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.local-address //go:noescape func wasmimport_TCPSocketLocalAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) @@ -405,7 +405,7 @@ func (self TCPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, netw return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.receive-buffer-size +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.receive-buffer-size //go:noescape func wasmimport_TCPSocketReceiveBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode]) @@ -431,7 +431,7 @@ func (self TCPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, ne return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.remote-address +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.remote-address //go:noescape func wasmimport_TCPSocketRemoteAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) @@ -446,7 +446,7 @@ func (self TCPSocket) SendBufferSize() (result cm.Result[uint64, uint64, network return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.send-buffer-size +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.send-buffer-size //go:noescape func wasmimport_TCPSocketSendBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode]) @@ -462,7 +462,7 @@ func (self TCPSocket) SetHopLimit(value uint8) (result cm.Result[network.ErrorCo return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-hop-limit +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-hop-limit //go:noescape func wasmimport_TCPSocketSetHopLimit(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -478,7 +478,7 @@ func (self TCPSocket) SetKeepAliveCount(value uint32) (result cm.Result[network. return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-keep-alive-count +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-count //go:noescape func wasmimport_TCPSocketSetKeepAliveCount(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -494,7 +494,7 @@ func (self TCPSocket) SetKeepAliveEnabled(value bool) (result cm.Result[network. return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-keep-alive-enabled +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-enabled //go:noescape func wasmimport_TCPSocketSetKeepAliveEnabled(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -510,7 +510,7 @@ func (self TCPSocket) SetKeepAliveIdleTime(value monotonicclock.Duration) (resul return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-keep-alive-idle-time +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-idle-time //go:noescape func wasmimport_TCPSocketSetKeepAliveIdleTime(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -526,7 +526,7 @@ func (self TCPSocket) SetKeepAliveInterval(value monotonicclock.Duration) (resul return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-keep-alive-interval +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-interval //go:noescape func wasmimport_TCPSocketSetKeepAliveInterval(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -555,7 +555,7 @@ func (self TCPSocket) SetListenBacklogSize(value uint64) (result cm.Result[netwo return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-listen-backlog-size +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-listen-backlog-size //go:noescape func wasmimport_TCPSocketSetListenBacklogSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -571,7 +571,7 @@ func (self TCPSocket) SetReceiveBufferSize(value uint64) (result cm.Result[netwo return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-receive-buffer-size +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-receive-buffer-size //go:noescape func wasmimport_TCPSocketSetReceiveBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -587,7 +587,7 @@ func (self TCPSocket) SetSendBufferSize(value uint64) (result cm.Result[network. return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.set-send-buffer-size +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-send-buffer-size //go:noescape func wasmimport_TCPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -603,7 +603,7 @@ func wasmimport_TCPSocketSetSendBufferSize(self0 uint32, value0 uint64, result * // associated with this socket will be closed and a FIN packet will be sent. // - `both`: Same effect as `receive` & `send` combined. // -// This function is idempotent; shutting down a direction more than once +// This function is idempotent. Shutting a down a direction more than once // has no effect and returns `ok`. // // The shutdown function does not close (drop) the socket. @@ -627,7 +627,7 @@ func (self TCPSocket) Shutdown(shutdownType ShutdownType) (result cm.Result[netw return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.shutdown +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.shutdown //go:noescape func wasmimport_TCPSocketShutdown(self0 uint32, shutdownType0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -693,7 +693,7 @@ func (self TCPSocket) StartBind(network_ network.Network, localAddress network.I return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.start-bind +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.start-bind //go:noescape func wasmimport_TCPSocketStartBind(self0 uint32, network0 uint32, localAddress0 uint32, localAddress1 uint32, localAddress2 uint32, localAddress3 uint32, localAddress4 uint32, localAddress5 uint32, localAddress6 uint32, localAddress7 uint32, localAddress8 uint32, localAddress9 uint32, localAddress10 uint32, localAddress11 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -702,7 +702,7 @@ func wasmimport_TCPSocketStartBind(self0 uint32, network0 uint32, localAddress0 // Connect to a remote endpoint. // // On success: -// - the socket is transitioned into the `connected` state. +// - the socket is transitioned into the `connection` state. // - a pair of streams is returned that can be used to read & write to the connection // // After a failed connection attempt, the socket will be in the `closed` @@ -765,7 +765,7 @@ func (self TCPSocket) StartConnect(network_ network.Network, remoteAddress netwo return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.start-connect +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.start-connect //go:noescape func wasmimport_TCPSocketStartConnect(self0 uint32, network0 uint32, remoteAddress0 uint32, remoteAddress1 uint32, remoteAddress2 uint32, remoteAddress3 uint32, remoteAddress4 uint32, remoteAddress5 uint32, remoteAddress6 uint32, remoteAddress7 uint32, remoteAddress8 uint32, remoteAddress9 uint32, remoteAddress10 uint32, remoteAddress11 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -809,7 +809,7 @@ func (self TCPSocket) StartListen() (result cm.Result[network.ErrorCode, struct{ return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.start-listen +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.start-listen //go:noescape func wasmimport_TCPSocketStartListen(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -827,8 +827,8 @@ func wasmimport_TCPSocketStartListen(self0 uint32, result *cm.Result[network.Err // `subscribe` only has to be called once per socket and can then be // (re)used for the remainder of the socket's lifetime. // -// See -// for more information. +// See +// for a more information. // // Note: this function is here for WASI Preview2 only. // It's planned to be removed when `future` is natively supported in Preview3. @@ -843,6 +843,6 @@ func (self TCPSocket) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:sockets/tcp@0.2.1 [method]tcp-socket.subscribe +//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.subscribe //go:noescape func wasmimport_TCPSocketSubscribe(self0 uint32) (result0 uint32) 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 bd004e0..3a5756e 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 @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package udpcreatesocket represents the imported interface "wasi:sockets/udp-create-socket@0.2.1". +// Package udpcreatesocket represents the imported interface "wasi:sockets/udp-create-socket@0.2.0". package udpcreatesocket import ( @@ -47,6 +47,6 @@ func CreateUDPSocket(addressFamily network.IPAddressFamily) (result cm.Result[ud return } -//go:wasmimport wasi:sockets/udp-create-socket@0.2.1 create-udp-socket +//go:wasmimport wasi:sockets/udp-create-socket@0.2.0 create-udp-socket //go:noescape func wasmimport_CreateUDPSocket(addressFamily0 uint32, result *cm.Result[udp.UDPSocket, udp.UDPSocket, network.ErrorCode]) 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 fcfbe72..6d4ca06 100644 --- a/examples/go/http/bindings/wasi/sockets/udp/udp.wit.go +++ b/examples/go/http/bindings/wasi/sockets/udp/udp.wit.go @@ -1,6 +1,6 @@ // Code generated by wit-bindgen-go. DO NOT EDIT. -// Package udp represents the imported interface "wasi:sockets/udp@0.2.1". +// Package udp represents the imported interface "wasi:sockets/udp@0.2.0". package udp import ( @@ -9,7 +9,7 @@ import ( "github.com/wasmCloud/wadge/examples/go/http/bindings/wasi/sockets/network" ) -// IncomingDatagram represents the record "wasi:sockets/udp@0.2.1#incoming-datagram". +// IncomingDatagram represents the record "wasi:sockets/udp@0.2.0#incoming-datagram". // // A received datagram. // @@ -32,7 +32,7 @@ type IncomingDatagram struct { RemoteAddress network.IPSocketAddress } -// OutgoingDatagram represents the record "wasi:sockets/udp@0.2.1#outgoing-datagram". +// OutgoingDatagram represents the record "wasi:sockets/udp@0.2.0#outgoing-datagram". // // A datagram to be sent out. // @@ -56,7 +56,7 @@ type OutgoingDatagram struct { RemoteAddress cm.Option[network.IPSocketAddress] } -// UDPSocket represents the imported resource "wasi:sockets/udp@0.2.1#udp-socket". +// UDPSocket represents the imported resource "wasi:sockets/udp@0.2.0#udp-socket". // // A UDP socket handle. // @@ -74,7 +74,7 @@ func (self UDPSocket) ResourceDrop() { return } -//go:wasmimport wasi:sockets/udp@0.2.1 [resource-drop]udp-socket +//go:wasmimport wasi:sockets/udp@0.2.0 [resource-drop]udp-socket //go:noescape func wasmimport_UDPSocketResourceDrop(self0 uint32) @@ -94,7 +94,7 @@ func (self UDPSocket) AddressFamily() (result network.IPAddressFamily) { return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.address-family +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.address-family //go:noescape func wasmimport_UDPSocketAddressFamily(self0 uint32) (result0 uint32) @@ -109,7 +109,7 @@ func (self UDPSocket) FinishBind() (result cm.Result[network.ErrorCode, struct{} return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.finish-bind +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.finish-bind //go:noescape func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -142,7 +142,7 @@ func (self UDPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, net return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.local-address +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.local-address //go:noescape func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) @@ -170,7 +170,7 @@ func (self UDPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, netw return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.receive-buffer-size +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.receive-buffer-size //go:noescape func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode]) @@ -196,7 +196,7 @@ func (self UDPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, ne return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.remote-address +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.remote-address //go:noescape func wasmimport_UDPSocketRemoteAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) @@ -211,7 +211,7 @@ func (self UDPSocket) SendBufferSize() (result cm.Result[uint64, uint64, network return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.send-buffer-size +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.send-buffer-size //go:noescape func wasmimport_UDPSocketSendBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode]) @@ -227,7 +227,7 @@ func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.Result[netwo return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.set-receive-buffer-size +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.set-receive-buffer-size //go:noescape func wasmimport_UDPSocketSetReceiveBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -243,7 +243,7 @@ func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.Result[network. return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.set-send-buffer-size +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.set-send-buffer-size //go:noescape func wasmimport_UDPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -259,7 +259,7 @@ func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.Result[network. return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.set-unicast-hop-limit +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.set-unicast-hop-limit //go:noescape func wasmimport_UDPSocketSetUnicastHopLimit(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -309,7 +309,7 @@ func (self UDPSocket) StartBind(network_ network.Network, localAddress network.I return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.start-bind +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.start-bind //go:noescape func wasmimport_UDPSocketStartBind(self0 uint32, network0 uint32, localAddress0 uint32, localAddress1 uint32, localAddress2 uint32, localAddress3 uint32, localAddress4 uint32, localAddress5 uint32, localAddress6 uint32, localAddress7 uint32, localAddress8 uint32, localAddress9 uint32, localAddress10 uint32, localAddress11 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) @@ -377,7 +377,7 @@ func (self UDPSocket) Stream(remoteAddress cm.Option[network.IPSocketAddress]) ( return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.stream +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.stream //go:noescape func wasmimport_UDPSocketStream(self0 uint32, remoteAddress0 uint32, remoteAddress1 uint32, remoteAddress2 uint32, remoteAddress3 uint32, remoteAddress4 uint32, remoteAddress5 uint32, remoteAddress6 uint32, remoteAddress7 uint32, remoteAddress8 uint32, remoteAddress9 uint32, remoteAddress10 uint32, remoteAddress11 uint32, remoteAddress12 uint32, result *cm.Result[TupleIncomingDatagramStreamOutgoingDatagramStreamShape, cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode]) @@ -398,7 +398,7 @@ func (self UDPSocket) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.subscribe +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.subscribe //go:noescape func wasmimport_UDPSocketSubscribe(self0 uint32) (result0 uint32) @@ -420,11 +420,11 @@ func (self UDPSocket) UnicastHopLimit() (result cm.Result[uint8, uint8, network. return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]udp-socket.unicast-hop-limit +//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.unicast-hop-limit //go:noescape func wasmimport_UDPSocketUnicastHopLimit(self0 uint32, result *cm.Result[uint8, uint8, network.ErrorCode]) -// IncomingDatagramStream represents the imported resource "wasi:sockets/udp@0.2.1#incoming-datagram-stream". +// IncomingDatagramStream represents the imported resource "wasi:sockets/udp@0.2.0#incoming-datagram-stream". // // resource incoming-datagram-stream type IncomingDatagramStream cm.Resource @@ -440,7 +440,7 @@ func (self IncomingDatagramStream) ResourceDrop() { return } -//go:wasmimport wasi:sockets/udp@0.2.1 [resource-drop]incoming-datagram-stream +//go:wasmimport wasi:sockets/udp@0.2.0 [resource-drop]incoming-datagram-stream //go:noescape func wasmimport_IncomingDatagramStreamResourceDrop(self0 uint32) @@ -482,7 +482,7 @@ func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.Result[ return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]incoming-datagram-stream.receive +//go:wasmimport wasi:sockets/udp@0.2.0 [method]incoming-datagram-stream.receive //go:noescape func wasmimport_IncomingDatagramStreamReceive(self0 uint32, maxResults0 uint64, result *cm.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], network.ErrorCode]) @@ -503,11 +503,11 @@ func (self IncomingDatagramStream) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]incoming-datagram-stream.subscribe +//go:wasmimport wasi:sockets/udp@0.2.0 [method]incoming-datagram-stream.subscribe //go:noescape func wasmimport_IncomingDatagramStreamSubscribe(self0 uint32) (result0 uint32) -// OutgoingDatagramStream represents the imported resource "wasi:sockets/udp@0.2.1#outgoing-datagram-stream". +// OutgoingDatagramStream represents the imported resource "wasi:sockets/udp@0.2.0#outgoing-datagram-stream". // // resource outgoing-datagram-stream type OutgoingDatagramStream cm.Resource @@ -523,7 +523,7 @@ func (self OutgoingDatagramStream) ResourceDrop() { return } -//go:wasmimport wasi:sockets/udp@0.2.1 [resource-drop]outgoing-datagram-stream +//go:wasmimport wasi:sockets/udp@0.2.0 [resource-drop]outgoing-datagram-stream //go:noescape func wasmimport_OutgoingDatagramStreamResourceDrop(self0 uint32) @@ -550,7 +550,7 @@ func (self OutgoingDatagramStream) CheckSend() (result cm.Result[uint64, uint64, return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]outgoing-datagram-stream.check-send +//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.check-send //go:noescape func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode]) @@ -615,7 +615,7 @@ func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (re return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]outgoing-datagram-stream.send +//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.send //go:noescape func wasmimport_OutgoingDatagramStreamSend(self0 uint32, datagrams0 *OutgoingDatagram, datagrams1 uint32, result *cm.Result[uint64, uint64, network.ErrorCode]) @@ -636,6 +636,6 @@ func (self OutgoingDatagramStream) Subscribe() (result poll.Pollable) { return } -//go:wasmimport wasi:sockets/udp@0.2.1 [method]outgoing-datagram-stream.subscribe +//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.subscribe //go:noescape func wasmimport_OutgoingDatagramStreamSubscribe(self0 uint32) (result0 uint32) diff --git a/examples/go/http/wadge_bindings_test.go b/examples/go/http/wadge_bindings_test.go index d624e91..0b732d5 100644 --- a/examples/go/http/wadge_bindings_test.go +++ b/examples/go/http/wadge_bindings_test.go @@ -1,6 +1,6 @@ // Code generated by wadge-bindgen-go DO NOT EDIT -package app_test +package main_test import ( github_com__bytecodealliance__wasm___tools___go__cm "github.com/bytecodealliance/wasm-tools-go/cm" @@ -22,7 +22,7 @@ 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 { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.0", "now", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr @@ -38,7 +38,7 @@ 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 { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.0", "resolution", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr @@ -54,7 +54,7 @@ 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 { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.0", "subscribe-duration", func() unsafe.Pointer { ptr := unsafe.Pointer(&when0) __p.Pin(ptr) return ptr @@ -74,7 +74,7 @@ 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 { + return __instance.Call("wasi:clocks/monotonic-clock@0.2.0", "subscribe-instant", func() unsafe.Pointer { ptr := unsafe.Pointer(&when0) __p.Pin(ptr) return ptr @@ -94,7 +94,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[constructor]fields", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr @@ -110,7 +110,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[constructor]outgoing-request", func() unsafe.Pointer { ptr := unsafe.Pointer(&headers0) __p.Pin(ptr) return ptr @@ -130,7 +130,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[constructor]outgoing-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&headers0) __p.Pin(ptr) return ptr @@ -150,7 +150,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[constructor]request-options", func() unsafe.Pointer { ptr := unsafe.Pointer(&result0) __p.Pin(ptr) return ptr @@ -166,7 +166,7 @@ func wasmimport_FieldsAppend(self0 uint32, name0 *uint8, name1 uint32, value0 *u 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]fields.append", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -202,7 +202,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]fields.clone", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -222,7 +222,7 @@ func wasmimport_FieldsDelete(self0 uint32, name0 *uint8, name1 uint32, result *g 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]fields.delete", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -250,7 +250,7 @@ func wasmimport_FieldsEntries(self0 uint32, result *github_com__bytecodealliance 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]fields.entries", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -270,7 +270,7 @@ func wasmimport_FieldsGet(self0 uint32, name0 *uint8, name1 uint32, result *gith 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]fields.get", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -298,7 +298,7 @@ func wasmimport_FieldsHas(self0 uint32, name0 *uint8, name1 uint32) (result0 uin 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]fields.has", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -326,7 +326,7 @@ func wasmimport_FieldsSet(self0 uint32, name0 *uint8, name1 uint32, value0 *gith 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]fields.set", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -362,7 +362,7 @@ func wasmimport_FutureIncomingResponseGet(self0 uint32, result *github_com__byte 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]future-incoming-response.get", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -382,7 +382,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]future-incoming-response.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -402,7 +402,7 @@ func wasmimport_FutureTrailersGet(self0 uint32, result *github_com__bytecodealli 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]future-trailers.get", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -422,7 +422,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]future-trailers.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -442,7 +442,7 @@ func wasmimport_IncomingBodyStream(self0 uint32, result *github_com__bytecodeall 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-body.stream", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -462,7 +462,7 @@ func wasmimport_IncomingRequestAuthority(self0 uint32, result *github_com__bytec 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-request.authority", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -482,7 +482,7 @@ func wasmimport_IncomingRequestConsume(self0 uint32, result *github_com__bytecod 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-request.consume", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -502,7 +502,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-request.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -522,7 +522,7 @@ func wasmimport_IncomingRequestMethod(self0 uint32, result *github_com__wasmClou 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-request.method", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -542,7 +542,7 @@ func wasmimport_IncomingRequestPathWithQuery(self0 uint32, result *github_com__b 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-request.path-with-query", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -562,7 +562,7 @@ func wasmimport_IncomingRequestScheme(self0 uint32, result *github_com__bytecode 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-request.scheme", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -582,7 +582,7 @@ func wasmimport_IncomingResponseConsume(self0 uint32, result *github_com__byteco 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-response.consume", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -602,7 +602,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-response.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -622,7 +622,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]incoming-response.status", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -642,7 +642,7 @@ func wasmimport_OutgoingBodyWrite(self0 uint32, result *github_com__bytecodealli 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-body.write", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -662,7 +662,7 @@ func wasmimport_OutgoingRequestAuthority(self0 uint32, result *github_com__bytec 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.authority", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -682,7 +682,7 @@ func wasmimport_OutgoingRequestBody(self0 uint32, result *github_com__bytecodeal 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -702,7 +702,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -722,7 +722,7 @@ func wasmimport_OutgoingRequestMethod(self0 uint32, result *github_com__wasmClou 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.method", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -742,7 +742,7 @@ func wasmimport_OutgoingRequestPathWithQuery(self0 uint32, result *github_com__b 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.path-with-query", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -762,7 +762,7 @@ func wasmimport_OutgoingRequestScheme(self0 uint32, result *github_com__bytecode 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.scheme", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -782,7 +782,7 @@ func wasmimport_OutgoingRequestSetAuthority(self0 uint32, authority0 uint32, aut 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.set-authority", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -814,7 +814,7 @@ func wasmimport_OutgoingRequestSetMethod(self0 uint32, method0 uint32, method1 * 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.set-method", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -846,7 +846,7 @@ func wasmimport_OutgoingRequestSetPathWithQuery(self0 uint32, pathWithQuery0 uin 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.set-path-with-query", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -878,7 +878,7 @@ func wasmimport_OutgoingRequestSetScheme(self0 uint32, scheme0 uint32, scheme1 u 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-request.set-scheme", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -914,7 +914,7 @@ func wasmimport_OutgoingResponseBody(self0 uint32, result *github_com__bytecodea 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-response.body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -934,7 +934,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-response.headers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -954,7 +954,7 @@ func wasmimport_OutgoingResponseSetStatusCode(self0 uint32, statusCode0 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-response.set-status-code", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -978,7 +978,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]outgoing-response.status-code", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -998,7 +998,7 @@ func wasmimport_RequestOptionsBetweenBytesTimeout(self0 uint32, result *github_c 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]request-options.between-bytes-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1018,7 +1018,7 @@ func wasmimport_RequestOptionsConnectTimeout(self0 uint32, result *github_com__b 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]request-options.connect-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1038,7 +1038,7 @@ func wasmimport_RequestOptionsFirstByteTimeout(self0 uint32, result *github_com_ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]request-options.first-byte-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1058,7 +1058,7 @@ func wasmimport_RequestOptionsSetBetweenBytesTimeout(self0 uint32, duration0 uin 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]request-options.set-between-bytes-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1086,7 +1086,7 @@ func wasmimport_RequestOptionsSetConnectTimeout(self0 uint32, duration0 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]request-options.set-connect-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1114,7 +1114,7 @@ func wasmimport_RequestOptionsSetFirstByteTimeout(self0 uint32, duration0 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 { + return __instance.Call("wasi:http/types@0.2.0", "[method]request-options.set-first-byte-timeout", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1142,7 +1142,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]fields", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1158,7 +1158,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]future-incoming-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1174,7 +1174,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]future-trailers", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1190,7 +1190,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]incoming-body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1206,7 +1206,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]incoming-request", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1222,7 +1222,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]incoming-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1238,7 +1238,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]outgoing-body", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1254,7 +1254,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]outgoing-request", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1270,7 +1270,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]outgoing-response", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1286,7 +1286,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]request-options", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1302,7 +1302,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[resource-drop]response-outparam", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1318,7 +1318,7 @@ func wasmimport_FieldsFromList(entries0 *github_com__bytecodealliance__wasm___to 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 { + return __instance.Call("wasi:http/types@0.2.0", "[static]fields.from-list", func() unsafe.Pointer { ptr := unsafe.Pointer(entries0) __p.Pin(ptr) return ptr @@ -1342,7 +1342,7 @@ 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 { + return __instance.Call("wasi:http/types@0.2.0", "[static]incoming-body.finish", func() unsafe.Pointer { ptr := unsafe.Pointer(&this0) __p.Pin(ptr) return ptr @@ -1362,7 +1362,7 @@ func wasmimport_OutgoingBodyFinish(this0 uint32, trailers0 uint32, trailers1 uin 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 { + return __instance.Call("wasi:http/types@0.2.0", "[static]outgoing-body.finish", func() unsafe.Pointer { ptr := unsafe.Pointer(&this0) __p.Pin(ptr) return ptr @@ -1390,7 +1390,7 @@ func wasmimport_ResponseOutparamSet(param0 uint32, response0 uint32, response1 u 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 { + return __instance.Call("wasi:http/types@0.2.0", "[static]response-outparam.set", func() unsafe.Pointer { ptr := unsafe.Pointer(¶m0) __p.Pin(ptr) return ptr @@ -1438,7 +1438,7 @@ func wasmimport_HTTPErrorCode(err0 uint32, result *github_com__bytecodealliance_ 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 { + return __instance.Call("wasi:http/types@0.2.0", "http-error-code", func() unsafe.Pointer { ptr := unsafe.Pointer(&err0) __p.Pin(ptr) return ptr @@ -1458,7 +1458,7 @@ 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 { + return __instance.Call("wasi:io/error@0.2.0", "[method]error.to-debug-string", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1478,7 +1478,7 @@ 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 { + return __instance.Call("wasi:io/error@0.2.0", "[resource-drop]error", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1494,7 +1494,7 @@ 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 { + return __instance.Call("wasi:io/poll@0.2.0", "[method]pollable.block", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1510,7 +1510,7 @@ 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 { + return __instance.Call("wasi:io/poll@0.2.0", "[method]pollable.ready", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1530,7 +1530,7 @@ 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 { + return __instance.Call("wasi:io/poll@0.2.0", "[resource-drop]pollable", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1546,7 +1546,7 @@ func wasmimport_Poll(in0 *github_com__wasmCloud__wadge__examples__go__http__bind 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 { + return __instance.Call("wasi:io/poll@0.2.0", "poll", func() unsafe.Pointer { ptr := unsafe.Pointer(in0) __p.Pin(ptr) return ptr @@ -1570,7 +1570,7 @@ func wasmimport_InputStreamBlockingRead(self0 uint32, len0 uint64, result *githu 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]input-stream.blocking-read", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1594,7 +1594,7 @@ func wasmimport_InputStreamBlockingSkip(self0 uint32, len0 uint64, result *githu 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]input-stream.blocking-skip", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1618,7 +1618,7 @@ func wasmimport_InputStreamRead(self0 uint32, len0 uint64, result *github_com__b 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]input-stream.read", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1642,7 +1642,7 @@ func wasmimport_InputStreamSkip(self0 uint32, len0 uint64, result *github_com__b 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]input-stream.skip", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1666,7 +1666,7 @@ 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]input-stream.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1686,7 +1686,7 @@ func wasmimport_OutputStreamBlockingFlush(self0 uint32, result *github_com__byte 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.blocking-flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1706,7 +1706,7 @@ func wasmimport_OutputStreamBlockingSplice(self0 uint32, src0 uint32, len0 uint6 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.blocking-splice", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1734,7 +1734,7 @@ func wasmimport_OutputStreamBlockingWriteAndFlush(self0 uint32, contents0 *uint8 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.blocking-write-and-flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1762,7 +1762,7 @@ func wasmimport_OutputStreamBlockingWriteZeroesAndFlush(self0 uint32, len0 uint6 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.blocking-write-zeroes-and-flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1786,7 +1786,7 @@ func wasmimport_OutputStreamCheckWrite(self0 uint32, result *github_com__bytecod 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.check-write", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1806,7 +1806,7 @@ func wasmimport_OutputStreamFlush(self0 uint32, result *github_com__bytecodealli 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.flush", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1826,7 +1826,7 @@ func wasmimport_OutputStreamSplice(self0 uint32, src0 uint32, len0 uint64, resul 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.splice", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1854,7 +1854,7 @@ 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.subscribe", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1874,7 +1874,7 @@ func wasmimport_OutputStreamWrite(self0 uint32, contents0 *uint8, contents1 uint 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.write", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1902,7 +1902,7 @@ func wasmimport_OutputStreamWriteZeroes(self0 uint32, len0 uint64, result *githu 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[method]output-stream.write-zeroes", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1926,7 +1926,7 @@ 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[resource-drop]input-stream", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr @@ -1942,7 +1942,7 @@ 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 { + return __instance.Call("wasi:io/streams@0.2.0", "[resource-drop]output-stream", func() unsafe.Pointer { ptr := unsafe.Pointer(&self0) __p.Pin(ptr) return ptr diff --git a/examples/go/http/wit/app.wit b/examples/go/http/wit/app.wit index 48c55a1..dbed706 100644 --- a/examples/go/http/wit/app.wit +++ b/examples/go/http/wit/app.wit @@ -1,8 +1,8 @@ package wadge-examples:http; world app { - include wasi:http/proxy@0.2.1; + include wasi:http/proxy@0.2.0; // Import all CLI interfaces, which are used by Go libraries - include wasi:cli/imports@0.2.1; + include wasi:cli/imports@0.2.0; } diff --git a/examples/go/http/wit/deps.lock b/examples/go/http/wit/deps.lock index 463fc62..5bd958b 100644 --- a/examples/go/http/wit/deps.lock +++ b/examples/go/http/wit/deps.lock @@ -1,29 +1,29 @@ [cli] -sha256 = "1de50b8e6940e73110cda10b7f90ca87a8fea886f0fa36c748f96dc70671ee38" -sha512 = "bbb6cd3e7b4d3237b6af9bfbb2633ccd2c4ea2a4f37b8c033255c7e0c1cb037be7f22ec1f8ca792cc8ec1942199582943979e646b4b272b85dcff7654eac51d0" +sha256 = "285865a31d777181b075f39e92bcfe59c89cd6bacce660be1b9a627646956258" +sha512 = "da2622210a9e3eea82b99f1a5b8a44ce5443d009cb943f7bca0bf9cf4360829b289913d7ee727c011f0f72994ea7dc8e661ebcc0a6b34b587297d80cd9b3f7e8" [clocks] -sha256 = "ea9d69ee803bc176e23e5268f5e24a2ac485dd1f62a0ab4c748e9d3f901f576f" -sha512 = "5efc22927c46cd56c41e5549ec775561c7fac2ea0d365abc0b55396d9475a7c9f984077a81f84a44a726f1c008fd2fadbffffa4fa53ecd5fbfd05afd379ab428" +sha256 = "468b4d12892fe926b8eb5d398dbf579d566c93231fa44f415440572c695b7613" +sha512 = "e6b53a07221f1413953c9797c68f08b815fdaebf66419bbc1ea3e8b7dece73731062693634731f311a03957b268cf9cc509c518bd15e513c318aa04a8459b93a" [filesystem] -sha256 = "cfe8c420e8b857de612ae2a3336680dae16b95c93c8ba3a6ff05b21210966740" -sha512 = "3c00c5544a58658e3e8025677091685286027fd49f37abf198c30b4e83b9e68f19723975aaa98794fba9f425ae9ef4f3dc0f5b9cf59203b5ecfaadf62b296f9a" +sha256 = "498c465cfd04587db40f970fff2185daa597d074c20b68a8bcbae558f261499b" +sha512 = "ead452f9b7bfb88593a502ec00d76d4228003d51c40fd0408aebc32d35c94673551b00230d730873361567cc209ec218c41fb4e95bad194268592c49e7964347" [http] -url = "https://github.com/WebAssembly/wasi-http/archive/v0.2.1.tar.gz" -sha256 = "ff21e05571af02488371bebc9cb674e30e0613eda22e3c1d8e1aba36cdff5ee8" -sha512 = "1825b56f1718e822acf1b49929ead8f6493752b1d3524ce0974c3acdf656af2fc3fe5c8456b71ffab44583bc3ae7061d5a285d8a7203fcae949d44b3d81e2f2b" +url = "https://github.com/WebAssembly/wasi-http/archive/v0.2.0.tar.gz" +sha256 = "8f44402bde16c48e28c47dc53eab0b26af5b3b3482a1852cf77673e0880ba1c1" +sha512 = "760695f9a25c25bf75a25b731cb21c3bda9e288e450edda823324ecbc73d5d798bbb5de2edad999566980836f037463ee9e57d61789d04b3f3e381475b1a9a0f" deps = ["cli", "clocks", "filesystem", "io", "random", "sockets"] [io] -sha256 = "2a74bd811adc46b5a0f19827ddbde89870e52b17615f4d0873f06fd977250caf" -sha512 = "94624f00c66e66203592cee820f80b1ba91ecdb71f682c154f25eaf71f8d8954197dcb64503bc21e72ed5e812af7eae876df47b7eb727b02db3a74a7ce0aefca" +sha256 = "7210e5653539a15478f894d4da24cc69d61924cbcba21d2804d69314a88e5a4c" +sha512 = "49184a1b0945a889abd52d25271172ed3dc2db6968fcdddb1bab7ee0081f4a3eeee0977ad2291126a37631c0d86eeea75d822fa8af224c422134500bf9f0f2bb" [random] -sha256 = "9e2d5056186f81b2e7f96bc97d2babd0341840f6abb4f170449b70992f1b598f" -sha512 = "67bf41d8d5d4b7af084124ee85196585225785969059f59e2f9ddb77ac1a8095cfe811ae29d076aac817418fa01064d7b9fbc0233930bace680758eeb21e36f8" +sha256 = "7371d03c037d924caba2587fb2e7c5773a0d3c5fcecbf7971e0e0ba57973c53d" +sha512 = "964c4e8925a53078e4d94ba907b54f89a0b7e154f46823a505391471466c17f53c8692682e5c85771712acd88b348686173fc07c53a3cfe3d301b8cd8ddd0de4" [sockets] -sha256 = "4c361137a7e61e8b9a73da2a0899dd9ad1a0c2dfee7d310cf168704c57b7a07c" -sha512 = "348b4ef381f57aec23d48537df8b69ab8963587dcb056e94c4cd5657e217677a4ee2a545868a5c829d2334cc6b8b0a61d3e72797999f44d78553fbd3a73c5b8d" +sha256 = "622bd28bbeb43736375dc02bd003fd3a016ff8ee91e14bab488325c6b38bf966" +sha512 = "5a63c1f36de0c4548e1d2297bdbededb28721cbad94ef7825c469eae29d7451c97e00b4c1d6730ee1ec0c4a5aac922961a2795762d4a0c3bb54e30a391a84bae" diff --git a/examples/go/http/wit/deps.toml b/examples/go/http/wit/deps.toml index 77a7d11..1b375ee 100644 --- a/examples/go/http/wit/deps.toml +++ b/examples/go/http/wit/deps.toml @@ -1 +1 @@ -http = "https://github.com/WebAssembly/wasi-http/archive/v0.2.1.tar.gz" +http = "https://github.com/WebAssembly/wasi-http/archive/v0.2.0.tar.gz" diff --git a/examples/go/http/wit/deps/cli/command.wit b/examples/go/http/wit/deps/cli/command.wit index dc064a3..d8005bd 100644 --- a/examples/go/http/wit/deps/cli/command.wit +++ b/examples/go/http/wit/deps/cli/command.wit @@ -1,10 +1,7 @@ -package wasi:cli@0.2.1; +package wasi:cli@0.2.0; -@since(version = 0.2.0) world command { - @since(version = 0.2.0) include imports; - @since(version = 0.2.0) export run; } diff --git a/examples/go/http/wit/deps/cli/environment.wit b/examples/go/http/wit/deps/cli/environment.wit index 2f449bd..7006523 100644 --- a/examples/go/http/wit/deps/cli/environment.wit +++ b/examples/go/http/wit/deps/cli/environment.wit @@ -1,4 +1,3 @@ -@since(version = 0.2.0) interface environment { /// Get the POSIX-style environment variables. /// @@ -8,15 +7,12 @@ interface environment { /// Morally, these are a value import, but until value imports are available /// in the component model, this import function should return the same /// values each time it is called. - @since(version = 0.2.0) get-environment: func() -> list>; /// Get the POSIX-style arguments to the program. - @since(version = 0.2.0) get-arguments: func() -> list; /// Return a path that programs should use as their initial current working /// directory, interpreting `.` as shorthand for this. - @since(version = 0.2.0) initial-cwd: func() -> option; } diff --git a/examples/go/http/wit/deps/cli/exit.wit b/examples/go/http/wit/deps/cli/exit.wit index 427935c..d0c2b82 100644 --- a/examples/go/http/wit/deps/cli/exit.wit +++ b/examples/go/http/wit/deps/cli/exit.wit @@ -1,17 +1,4 @@ -@since(version = 0.2.0) interface exit { /// Exit the current instance and any linked instances. - @since(version = 0.2.0) exit: func(status: result); - - /// Exit the current instance and any linked instances, reporting the - /// specified status code to the host. - /// - /// The meaning of the code depends on the context, with 0 usually meaning - /// "success", and other values indicating various types of failure. - /// - /// This function does not return; the effect is analogous to a trap, but - /// without the connotation that something bad has happened. - @unstable(feature = cli-exit-with-code) - exit-with-code: func(status-code: u8); } diff --git a/examples/go/http/wit/deps/cli/imports.wit b/examples/go/http/wit/deps/cli/imports.wit index b8339d3..083b84a 100644 --- a/examples/go/http/wit/deps/cli/imports.wit +++ b/examples/go/http/wit/deps/cli/imports.wit @@ -1,36 +1,20 @@ -package wasi:cli@0.2.1; +package wasi:cli@0.2.0; -@since(version = 0.2.0) world imports { - @since(version = 0.2.0) - include wasi:clocks/imports@0.2.1; - @since(version = 0.2.0) - include wasi:filesystem/imports@0.2.1; - @since(version = 0.2.0) - include wasi:sockets/imports@0.2.1; - @since(version = 0.2.0) - include wasi:random/imports@0.2.1; - @since(version = 0.2.0) - include wasi:io/imports@0.2.1; + include wasi:clocks/imports@0.2.0; + include wasi:filesystem/imports@0.2.0; + include wasi:sockets/imports@0.2.0; + include wasi:random/imports@0.2.0; + include wasi:io/imports@0.2.0; - @since(version = 0.2.0) import environment; - @since(version = 0.2.0) import exit; - @since(version = 0.2.0) import stdin; - @since(version = 0.2.0) import stdout; - @since(version = 0.2.0) import stderr; - @since(version = 0.2.0) import terminal-input; - @since(version = 0.2.0) import terminal-output; - @since(version = 0.2.0) import terminal-stdin; - @since(version = 0.2.0) import terminal-stdout; - @since(version = 0.2.0) import terminal-stderr; } diff --git a/examples/go/http/wit/deps/cli/run.wit b/examples/go/http/wit/deps/cli/run.wit index 655346e..a70ee8c 100644 --- a/examples/go/http/wit/deps/cli/run.wit +++ b/examples/go/http/wit/deps/cli/run.wit @@ -1,6 +1,4 @@ -@since(version = 0.2.0) interface run { /// Run the program. - @since(version = 0.2.0) run: func() -> result; } diff --git a/examples/go/http/wit/deps/cli/stdio.wit b/examples/go/http/wit/deps/cli/stdio.wit index d1d26eb..31ef35b 100644 --- a/examples/go/http/wit/deps/cli/stdio.wit +++ b/examples/go/http/wit/deps/cli/stdio.wit @@ -1,26 +1,17 @@ -@since(version = 0.2.0) interface stdin { - @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream}; + use wasi:io/streams@0.2.0.{input-stream}; - @since(version = 0.2.0) get-stdin: func() -> input-stream; } -@since(version = 0.2.0) interface stdout { - @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{output-stream}; + use wasi:io/streams@0.2.0.{output-stream}; - @since(version = 0.2.0) get-stdout: func() -> output-stream; } -@since(version = 0.2.0) interface stderr { - @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{output-stream}; + use wasi:io/streams@0.2.0.{output-stream}; - @since(version = 0.2.0) get-stderr: func() -> output-stream; } diff --git a/examples/go/http/wit/deps/cli/terminal.wit b/examples/go/http/wit/deps/cli/terminal.wit index d305498..38c724e 100644 --- a/examples/go/http/wit/deps/cli/terminal.wit +++ b/examples/go/http/wit/deps/cli/terminal.wit @@ -3,10 +3,8 @@ /// In the future, this may include functions for disabling echoing, /// disabling input buffering so that keyboard events are sent through /// immediately, querying supported features, and so on. -@since(version = 0.2.0) interface terminal-input { /// The input side of a terminal. - @since(version = 0.2.0) resource terminal-input; } @@ -15,48 +13,37 @@ interface terminal-input { /// In the future, this may include functions for querying the terminal /// size, being notified of terminal size changes, querying supported /// features, and so on. -@since(version = 0.2.0) interface terminal-output { /// The output side of a terminal. - @since(version = 0.2.0) resource terminal-output; } /// An interface providing an optional `terminal-input` for stdin as a /// link-time authority. -@since(version = 0.2.0) interface terminal-stdin { - @since(version = 0.2.0) use terminal-input.{terminal-input}; /// If stdin is connected to a terminal, return a `terminal-input` handle /// allowing further interaction with it. - @since(version = 0.2.0) get-terminal-stdin: func() -> option; } /// An interface providing an optional `terminal-output` for stdout as a /// link-time authority. -@since(version = 0.2.0) interface terminal-stdout { - @since(version = 0.2.0) use terminal-output.{terminal-output}; /// If stdout is connected to a terminal, return a `terminal-output` handle /// allowing further interaction with it. - @since(version = 0.2.0) get-terminal-stdout: func() -> option; } /// An interface providing an optional `terminal-output` for stderr as a /// link-time authority. -@since(version = 0.2.0) interface terminal-stderr { - @since(version = 0.2.0) use terminal-output.{terminal-output}; /// If stderr is connected to a terminal, return a `terminal-output` handle /// allowing further interaction with it. - @since(version = 0.2.0) get-terminal-stderr: func() -> option; } diff --git a/examples/go/http/wit/deps/clocks/monotonic-clock.wit b/examples/go/http/wit/deps/clocks/monotonic-clock.wit index 3c24840..4e4dc3a 100644 --- a/examples/go/http/wit/deps/clocks/monotonic-clock.wit +++ b/examples/go/http/wit/deps/clocks/monotonic-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.0; /// WASI Monotonic Clock is a clock API intended to let users measure elapsed /// time. /// @@ -7,43 +7,38 @@ package wasi:clocks@0.2.1; /// /// A monotonic clock is a clock which has an unspecified initial value, and /// successive reads of the clock will produce non-decreasing values. -@since(version = 0.2.0) +/// +/// It is intended for measuring elapsed time. interface monotonic-clock { - @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.0.{pollable}; /// An instant in time, in nanoseconds. An instant is relative to an /// unspecified initial value, and can only be compared to instances from /// the same monotonic-clock. - @since(version = 0.2.0) type instant = u64; /// A duration of time, in nanoseconds. - @since(version = 0.2.0) type duration = u64; /// Read the current value of the clock. /// /// The clock is monotonic, therefore calling this function repeatedly will /// produce a sequence of non-decreasing values. - @since(version = 0.2.0) now: func() -> instant; /// Query the resolution of the clock. Returns the duration of time /// corresponding to a clock tick. - @since(version = 0.2.0) resolution: func() -> duration; /// Create a `pollable` which will resolve once the specified instant - /// has occurred. - @since(version = 0.2.0) + /// occured. subscribe-instant: func( when: instant, ) -> pollable; - /// Create a `pollable` that will resolve after the specified duration has - /// elapsed from the time this function is invoked. - @since(version = 0.2.0) + /// Create a `pollable` which will resolve once the given duration has + /// elapsed, starting at the time at which this function was called. + /// occured. subscribe-duration: func( when: duration, ) -> pollable; diff --git a/examples/go/http/wit/deps/clocks/timezone.wit b/examples/go/http/wit/deps/clocks/timezone.wit deleted file mode 100644 index 212da66..0000000 --- a/examples/go/http/wit/deps/clocks/timezone.wit +++ /dev/null @@ -1,55 +0,0 @@ -package wasi:clocks@0.2.1; - -@unstable(feature = clocks-timezone) -interface timezone { - @unstable(feature = clocks-timezone) - use wall-clock.{datetime}; - - /// Return information needed to display the given `datetime`. This includes - /// the UTC offset, the time zone name, and a flag indicating whether - /// daylight saving time is active. - /// - /// If the timezone cannot be determined for the given `datetime`, return a - /// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight - /// saving time. - @unstable(feature = clocks-timezone) - display: func(when: datetime) -> timezone-display; - - /// The same as `display`, but only return the UTC offset. - @unstable(feature = clocks-timezone) - utc-offset: func(when: datetime) -> s32; - - /// Information useful for displaying the timezone of a specific `datetime`. - /// - /// This information may vary within a single `timezone` to reflect daylight - /// saving time adjustments. - @unstable(feature = clocks-timezone) - record timezone-display { - /// The number of seconds difference between UTC time and the local - /// time of the timezone. - /// - /// The returned value will always be less than 86400 which is the - /// number of seconds in a day (24*60*60). - /// - /// In implementations that do not expose an actual time zone, this - /// should return 0. - utc-offset: s32, - - /// The abbreviated name of the timezone to display to a user. The name - /// `UTC` indicates Coordinated Universal Time. Otherwise, this should - /// reference local standards for the name of the time zone. - /// - /// In implementations that do not expose an actual time zone, this - /// should be the string `UTC`. - /// - /// In time zones that do not have an applicable name, a formatted - /// representation of the UTC offset may be returned, such as `-04:00`. - name: string, - - /// Whether daylight saving time is active. - /// - /// In implementations that do not expose an actual time zone, this - /// should return false. - in-daylight-saving-time: bool, - } -} diff --git a/examples/go/http/wit/deps/clocks/wall-clock.wit b/examples/go/http/wit/deps/clocks/wall-clock.wit index 6be069a..440ca0f 100644 --- a/examples/go/http/wit/deps/clocks/wall-clock.wit +++ b/examples/go/http/wit/deps/clocks/wall-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.0; /// WASI Wall Clock is a clock API intended to let users query the current /// time. The name "wall" makes an analogy to a "clock on the wall", which /// is not necessarily monotonic as it may be reset. @@ -13,10 +13,8 @@ package wasi:clocks@0.2.1; /// monotonic, making it unsuitable for measuring elapsed time. /// /// It is intended for reporting the current date and time for humans. -@since(version = 0.2.0) interface wall-clock { /// A time and date in seconds plus nanoseconds. - @since(version = 0.2.0) record datetime { seconds: u64, nanoseconds: u32, @@ -35,12 +33,10 @@ interface wall-clock { /// /// [POSIX's Seconds Since the Epoch]: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap04.html#tag_21_04_16 /// [Unix Time]: https://en.wikipedia.org/wiki/Unix_time - @since(version = 0.2.0) now: func() -> datetime; /// Query the resolution of the clock. /// /// The nanoseconds field of the output is always less than 1000000000. - @since(version = 0.2.0) resolution: func() -> datetime; } diff --git a/examples/go/http/wit/deps/clocks/world.wit b/examples/go/http/wit/deps/clocks/world.wit index 9251ac6..c022457 100644 --- a/examples/go/http/wit/deps/clocks/world.wit +++ b/examples/go/http/wit/deps/clocks/world.wit @@ -1,11 +1,6 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.0; -@since(version = 0.2.0) world imports { - @since(version = 0.2.0) import monotonic-clock; - @since(version = 0.2.0) import wall-clock; - @unstable(feature = clocks-timezone) - import timezone; } diff --git a/examples/go/http/wit/deps/filesystem/preopens.wit b/examples/go/http/wit/deps/filesystem/preopens.wit index ca2f726..da801f6 100644 --- a/examples/go/http/wit/deps/filesystem/preopens.wit +++ b/examples/go/http/wit/deps/filesystem/preopens.wit @@ -1,11 +1,8 @@ -package wasi:filesystem@0.2.1; +package wasi:filesystem@0.2.0; -@since(version = 0.2.0) interface preopens { - @since(version = 0.2.0) use types.{descriptor}; /// Return the set of preopened directories, and their path. - @since(version = 0.2.0) get-directories: func() -> list>; } diff --git a/examples/go/http/wit/deps/filesystem/types.wit b/examples/go/http/wit/deps/filesystem/types.wit index db3d968..11108fc 100644 --- a/examples/go/http/wit/deps/filesystem/types.wit +++ b/examples/go/http/wit/deps/filesystem/types.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.1; +package wasi:filesystem@0.2.0; /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. @@ -23,21 +23,16 @@ package wasi:filesystem@0.2.1; /// [WASI filesystem path resolution]. /// /// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md -@since(version = 0.2.0) interface types { - @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream, output-stream, error}; - @since(version = 0.2.0) - use wasi:clocks/wall-clock@0.2.1.{datetime}; + use wasi:io/streams@0.2.0.{input-stream, output-stream, error}; + use wasi:clocks/wall-clock@0.2.0.{datetime}; /// File size or length of a region within a file. - @since(version = 0.2.0) type filesize = u64; /// The type of a filesystem object referenced by a descriptor. /// /// Note: This was called `filetype` in earlier versions of WASI. - @since(version = 0.2.0) enum descriptor-type { /// The type of the descriptor or file is unknown or is different from /// any of the other types specified. @@ -61,7 +56,6 @@ interface types { /// Descriptor flags. /// /// Note: This was called `fdflags` in earlier versions of WASI. - @since(version = 0.2.0) flags descriptor-flags { /// Read mode: Data can be read. read, @@ -83,7 +77,7 @@ interface types { /// WASI. At this time, it should be interpreted as a request, and not a /// requirement. data-integrity-sync, - /// Requests that reads be performed at the same level of integrity + /// Requests that reads be performed at the same level of integrety /// requested for writes. This is similar to `O_RSYNC` in POSIX. /// /// The precise semantics of this operation have not yet been defined for @@ -105,7 +99,6 @@ interface types { /// File attributes. /// /// Note: This was called `filestat` in earlier versions of WASI. - @since(version = 0.2.0) record descriptor-stat { /// File type. %type: descriptor-type, @@ -132,7 +125,6 @@ interface types { } /// Flags determining the method of how paths are resolved. - @since(version = 0.2.0) flags path-flags { /// As long as the resolved path corresponds to a symbolic link, it is /// expanded. @@ -140,7 +132,6 @@ interface types { } /// Open flags used by `open-at`. - @since(version = 0.2.0) flags open-flags { /// Create file if it does not exist, similar to `O_CREAT` in POSIX. create, @@ -153,11 +144,9 @@ interface types { } /// Number of hard links to an inode. - @since(version = 0.2.0) type link-count = u64; /// When setting a timestamp, this gives the value to set it to. - @since(version = 0.2.0) variant new-timestamp { /// Leave the timestamp set to its previous value. no-change, @@ -259,7 +248,6 @@ interface types { } /// File or memory access pattern advisory information. - @since(version = 0.2.0) enum advice { /// The application has no advice to give on its behavior with respect /// to the specified data. @@ -283,7 +271,6 @@ interface types { /// A 128-bit hash value, split into parts because wasm doesn't have a /// 128-bit integer type. - @since(version = 0.2.0) record metadata-hash-value { /// 64 bits of a 128-bit hash value. lower: u64, @@ -294,7 +281,6 @@ interface types { /// A descriptor is a reference to a filesystem object, which may be a file, /// directory, named pipe, special file, or other object on which filesystem /// calls may be made. - @since(version = 0.2.0) resource descriptor { /// Return a stream for reading from a file, if available. /// @@ -304,7 +290,6 @@ interface types { /// file and they do not interfere with each other. /// /// Note: This allows using `read-stream`, which is similar to `read` in POSIX. - @since(version = 0.2.0) read-via-stream: func( /// The offset within the file at which to start reading. offset: filesize, @@ -316,7 +301,6 @@ interface types { /// /// Note: This allows using `write-stream`, which is similar to `write` in /// POSIX. - @since(version = 0.2.0) write-via-stream: func( /// The offset within the file at which to start writing. offset: filesize, @@ -328,13 +312,11 @@ interface types { /// /// Note: This allows using `write-stream`, which is similar to `write` with /// `O_APPEND` in in POSIX. - @since(version = 0.2.0) append-via-stream: func() -> result; /// Provide file advisory information on a descriptor. /// /// This is similar to `posix_fadvise` in POSIX. - @since(version = 0.2.0) advise: func( /// The offset within the file to which the advisory applies. offset: filesize, @@ -350,7 +332,6 @@ interface types { /// opened for writing. /// /// Note: This is similar to `fdatasync` in POSIX. - @since(version = 0.2.0) sync-data: func() -> result<_, error-code>; /// Get flags associated with a descriptor. @@ -359,7 +340,6 @@ interface types { /// /// Note: This returns the value that was the `fs_flags` value returned /// from `fdstat_get` in earlier versions of WASI. - @since(version = 0.2.0) get-flags: func() -> result; /// Get the dynamic type of a descriptor. @@ -372,14 +352,12 @@ interface types { /// /// Note: This returns the value that was the `fs_filetype` value returned /// from `fdstat_get` in earlier versions of WASI. - @since(version = 0.2.0) get-type: func() -> result; /// Adjust the size of an open file. If this increases the file's size, the /// extra bytes are filled with zeros. /// /// Note: This was called `fd_filestat_set_size` in earlier versions of WASI. - @since(version = 0.2.0) set-size: func(size: filesize) -> result<_, error-code>; /// Adjust the timestamps of an open file or directory. @@ -387,7 +365,6 @@ interface types { /// Note: This is similar to `futimens` in POSIX. /// /// Note: This was called `fd_filestat_set_times` in earlier versions of WASI. - @since(version = 0.2.0) set-times: func( /// The desired values of the data access timestamp. data-access-timestamp: new-timestamp, @@ -406,7 +383,6 @@ interface types { /// In the future, this may change to return a `stream`. /// /// Note: This is similar to `pread` in POSIX. - @since(version = 0.2.0) read: func( /// The maximum number of bytes to read. length: filesize, @@ -423,7 +399,6 @@ interface types { /// In the future, this may change to take a `stream`. /// /// Note: This is similar to `pwrite` in POSIX. - @since(version = 0.2.0) write: func( /// Data to write buffer: list, @@ -440,7 +415,6 @@ interface types { /// This always returns a new stream which starts at the beginning of the /// directory. Multiple streams may be active on the same directory, and they /// do not interfere with each other. - @since(version = 0.2.0) read-directory: func() -> result; /// Synchronize the data and metadata of a file to disk. @@ -449,13 +423,11 @@ interface types { /// opened for writing. /// /// Note: This is similar to `fsync` in POSIX. - @since(version = 0.2.0) sync: func() -> result<_, error-code>; /// Create a directory. /// /// Note: This is similar to `mkdirat` in POSIX. - @since(version = 0.2.0) create-directory-at: func( /// The relative path at which to create the directory. path: string, @@ -470,7 +442,6 @@ interface types { /// modified, use `metadata-hash`. /// /// Note: This was called `fd_filestat_get` in earlier versions of WASI. - @since(version = 0.2.0) stat: func() -> result; /// Return the attributes of a file or directory. @@ -480,7 +451,6 @@ interface types { /// discussion of alternatives. /// /// Note: This was called `path_filestat_get` in earlier versions of WASI. - @since(version = 0.2.0) stat-at: func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, @@ -494,7 +464,6 @@ interface types { /// /// Note: This was called `path_filestat_set_times` in earlier versions of /// WASI. - @since(version = 0.2.0) set-times-at: func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, @@ -509,7 +478,6 @@ interface types { /// Create a hard link. /// /// Note: This is similar to `linkat` in POSIX. - @since(version = 0.2.0) link-at: func( /// Flags determining the method of how the path is resolved. old-path-flags: path-flags, @@ -539,7 +507,6 @@ interface types { /// `error-code::read-only`. /// /// Note: This is similar to `openat` in POSIX. - @since(version = 0.2.0) open-at: func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, @@ -557,7 +524,6 @@ interface types { /// filesystem, this function fails with `error-code::not-permitted`. /// /// Note: This is similar to `readlinkat` in POSIX. - @since(version = 0.2.0) readlink-at: func( /// The relative path of the symbolic link from which to read. path: string, @@ -568,7 +534,6 @@ interface types { /// Return `error-code::not-empty` if the directory is not empty. /// /// Note: This is similar to `unlinkat(fd, path, AT_REMOVEDIR)` in POSIX. - @since(version = 0.2.0) remove-directory-at: func( /// The relative path to a directory to remove. path: string, @@ -577,7 +542,6 @@ interface types { /// Rename a filesystem object. /// /// Note: This is similar to `renameat` in POSIX. - @since(version = 0.2.0) rename-at: func( /// The relative source path of the file or directory to rename. old-path: string, @@ -593,7 +557,6 @@ interface types { /// `error-code::not-permitted`. /// /// Note: This is similar to `symlinkat` in POSIX. - @since(version = 0.2.0) symlink-at: func( /// The contents of the symbolic link. old-path: string, @@ -605,7 +568,6 @@ interface types { /// /// Return `error-code::is-directory` if the path refers to a directory. /// Note: This is similar to `unlinkat(fd, path, 0)` in POSIX. - @since(version = 0.2.0) unlink-file-at: func( /// The relative path to a file to unlink. path: string, @@ -617,7 +579,6 @@ interface types { /// same device (`st_dev`) and inode (`st_ino` or `d_ino`) numbers. /// wasi-filesystem does not expose device and inode numbers, so this function /// may be used instead. - @since(version = 0.2.0) is-same-object: func(other: borrow) -> bool; /// Return a hash of the metadata associated with a filesystem object referred @@ -639,14 +600,12 @@ interface types { /// computed hash. /// /// However, none of these is required. - @since(version = 0.2.0) metadata-hash: func() -> result; /// Return a hash of the metadata associated with a filesystem object referred /// to by a directory descriptor and a relative path. /// /// This performs the same hash computation as `metadata-hash`. - @since(version = 0.2.0) metadata-hash-at: func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, @@ -656,10 +615,8 @@ interface types { } /// A stream of directory entries. - @since(version = 0.2.0) resource directory-entry-stream { /// Read a single directory entry from a `directory-entry-stream`. - @since(version = 0.2.0) read-directory-entry: func() -> result, error-code>; } @@ -673,6 +630,5 @@ interface types { /// /// Note that this function is fallible because not all stream-related /// errors are filesystem-related errors. - @since(version = 0.2.0) filesystem-error-code: func(err: borrow) -> option; } diff --git a/examples/go/http/wit/deps/filesystem/world.wit b/examples/go/http/wit/deps/filesystem/world.wit index af0146c..663f579 100644 --- a/examples/go/http/wit/deps/filesystem/world.wit +++ b/examples/go/http/wit/deps/filesystem/world.wit @@ -1,9 +1,6 @@ -package wasi:filesystem@0.2.1; +package wasi:filesystem@0.2.0; -@since(version = 0.2.0) world imports { - @since(version = 0.2.0) import types; - @since(version = 0.2.0) import preopens; } diff --git a/examples/go/http/wit/deps/http/handler.wit b/examples/go/http/wit/deps/http/handler.wit index 6a6c629..a34a064 100644 --- a/examples/go/http/wit/deps/http/handler.wit +++ b/examples/go/http/wit/deps/http/handler.wit @@ -1,8 +1,6 @@ /// This interface defines a handler of incoming HTTP Requests. It should /// be exported by components which can respond to HTTP Requests. -@since(version = 0.2.0) interface incoming-handler { - @since(version = 0.2.0) use types.{incoming-request, response-outparam}; /// This function is invoked with an incoming HTTP Request, and a resource @@ -15,7 +13,6 @@ interface incoming-handler { /// The implementor of this function must write a response to the /// `response-outparam` before returning, or else the caller will respond /// with an error on its behalf. - @since(version = 0.2.0) handle: func( request: incoming-request, response-out: response-outparam @@ -24,9 +21,7 @@ interface incoming-handler { /// This interface defines a handler of outgoing HTTP Requests. It should be /// imported by components which wish to make HTTP Requests. -@since(version = 0.2.0) interface outgoing-handler { - @since(version = 0.2.0) use types.{ outgoing-request, request-options, future-incoming-response, error-code }; @@ -41,7 +36,6 @@ interface outgoing-handler { /// This function may return an error if the `outgoing-request` is invalid /// or not allowed to be made. Otherwise, protocol errors are reported /// through the `future-incoming-response`. - @since(version = 0.2.0) handle: func( request: outgoing-request, options: option diff --git a/examples/go/http/wit/deps/http/proxy.wit b/examples/go/http/wit/deps/http/proxy.wit index 415d2ee..687c24d 100644 --- a/examples/go/http/wit/deps/http/proxy.wit +++ b/examples/go/http/wit/deps/http/proxy.wit @@ -1,50 +1,32 @@ -package wasi:http@0.2.1; +package wasi:http@0.2.0; -/// The `wasi:http/imports` world imports all the APIs for HTTP proxies. -/// It is intended to be `include`d in other worlds. -@since(version = 0.2.0) -world imports { +/// The `wasi:http/proxy` world captures a widely-implementable intersection of +/// hosts that includes HTTP forward and reverse proxies. Components targeting +/// this world may concurrently stream in and out any number of incoming and +/// outgoing HTTP requests. +world proxy { /// HTTP proxies have access to time and randomness. - @since(version = 0.2.0) - import wasi:clocks/monotonic-clock@0.2.1; - @since(version = 0.2.0) - import wasi:clocks/wall-clock@0.2.1; - @since(version = 0.2.0) - import wasi:random/random@0.2.1; + include wasi:clocks/imports@0.2.0; + import wasi:random/random@0.2.0; /// Proxies have standard output and error streams which are expected to /// terminate in a developer-facing console provided by the host. - @since(version = 0.2.0) - import wasi:cli/stdout@0.2.1; - @since(version = 0.2.0) - import wasi:cli/stderr@0.2.1; + import wasi:cli/stdout@0.2.0; + import wasi:cli/stderr@0.2.0; /// TODO: this is a temporary workaround until component tooling is able to /// gracefully handle the absence of stdin. Hosts must return an eof stream /// for this import, which is what wasi-libc + tooling will do automatically /// when this import is properly removed. - @since(version = 0.2.0) - import wasi:cli/stdin@0.2.1; + import wasi:cli/stdin@0.2.0; /// This is the default handler to use when user code simply wants to make an /// HTTP request (e.g., via `fetch()`). - @since(version = 0.2.0) import outgoing-handler; -} - -/// The `wasi:http/proxy` world captures a widely-implementable intersection of -/// hosts that includes HTTP forward and reverse proxies. Components targeting -/// this world may concurrently stream in and out any number of incoming and -/// outgoing HTTP requests. -@since(version = 0.2.0) -world proxy { - @since(version = 0.2.0) - include imports; /// The host delivers incoming HTTP requests to a component by calling the /// `handle` function of this exported interface. A host may arbitrarily reuse /// or not reuse component instance when delivering incoming HTTP requests and /// thus a component must be able to handle 0..N calls to `handle`. - @since(version = 0.2.0) export incoming-handler; } diff --git a/examples/go/http/wit/deps/http/types.wit b/examples/go/http/wit/deps/http/types.wit index 3c45cd0..755ac6a 100644 --- a/examples/go/http/wit/deps/http/types.wit +++ b/examples/go/http/wit/deps/http/types.wit @@ -1,19 +1,13 @@ /// This interface defines all of the types and methods for implementing /// HTTP Requests and Responses, both incoming and outgoing, as well as /// their headers, trailers, and bodies. -@since(version = 0.2.0) interface types { - @since(version = 0.2.0) - use wasi:clocks/monotonic-clock@0.2.1.{duration}; - @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream, output-stream}; - @since(version = 0.2.0) - use wasi:io/error@0.2.1.{error as io-error}; - @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:clocks/monotonic-clock@0.2.0.{duration}; + use wasi:io/streams@0.2.0.{input-stream, output-stream}; + use wasi:io/error@0.2.0.{error as io-error}; + use wasi:io/poll@0.2.0.{pollable}; /// This type corresponds to HTTP standard Methods. - @since(version = 0.2.0) variant method { get, head, @@ -28,7 +22,6 @@ interface types { } /// This type corresponds to HTTP standard Related Schemes. - @since(version = 0.2.0) variant scheme { HTTP, HTTPS, @@ -37,7 +30,6 @@ interface types { /// These cases are inspired by the IANA HTTP Proxy Error Types: /// https://www.iana.org/assignments/http-proxy-status/http-proxy-status.xhtml#table-http-proxy-error-types - @since(version = 0.2.0) variant error-code { DNS-timeout, DNS-error(DNS-error-payload), @@ -86,21 +78,18 @@ interface types { } /// Defines the case payload type for `DNS-error` above: - @since(version = 0.2.0) record DNS-error-payload { rcode: option, info-code: option } /// Defines the case payload type for `TLS-alert-received` above: - @since(version = 0.2.0) record TLS-alert-received-payload { alert-id: option, alert-message: option } /// Defines the case payload type for `HTTP-response-{header,trailer}-size` above: - @since(version = 0.2.0) record field-size-payload { field-name: option, field-size: option @@ -117,12 +106,10 @@ interface types { /// /// Note that this function is fallible because not all io-errors are /// http-related errors. - @since(version = 0.2.0) http-error-code: func(err: borrow) -> option; /// This type enumerates the different kinds of errors that may occur when /// setting or appending to a `fields` resource. - @since(version = 0.2.0) variant header-error { /// This error indicates that a `field-key` or `field-value` was /// syntactically invalid when used with an operation that sets headers in a @@ -139,13 +126,11 @@ interface types { } /// Field keys are always strings. - @since(version = 0.2.0) type field-key = string; /// Field values should always be ASCII strings. However, in /// reality, HTTP implementations often have to interpret malformed values, /// so they are provided as a list of bytes. - @since(version = 0.2.0) type field-value = list; /// This following block defines the `fields` resource which corresponds to @@ -158,13 +143,11 @@ interface types { /// `incoming-request.headers`, `outgoing-request.headers`) might be be /// immutable. In an immutable fields, the `set`, `append`, and `delete` /// operations will fail with `header-error.immutable`. - @since(version = 0.2.0) resource fields { /// Construct an empty HTTP Fields. /// /// The resulting `fields` is mutable. - @since(version = 0.2.0) constructor(); /// Construct an HTTP Fields. @@ -176,55 +159,42 @@ interface types { /// list with the same key. /// /// The tuple is a pair of the field key, represented as a string, and - /// Value, represented as a list of bytes. + /// Value, represented as a list of bytes. In a valid Fields, all keys + /// and values are valid UTF-8 strings. However, values are not always + /// well-formed, so they are represented as a raw list of bytes. /// - /// An error result will be returned if any `field-key` or `field-value` is - /// syntactically invalid, or if a field is forbidden. - @since(version = 0.2.0) + /// An error result will be returned if any header or value was + /// syntactically invalid, or if a header was forbidden. from-list: static func( entries: list> ) -> result; /// Get all of the values corresponding to a key. If the key is not present - /// in this `fields` or is syntactically invalid, an empty list is returned. - /// However, if the key is present but empty, this is represented by a list - /// with one or more empty field-values present. - @since(version = 0.2.0) + /// in this `fields`, an empty list is returned. However, if the key is + /// present but empty, this is represented by a list with one or more + /// empty field-values present. get: func(name: field-key) -> list; /// Returns `true` when the key is present in this `fields`. If the key is /// syntactically invalid, `false` is returned. - @since(version = 0.2.0) has: func(name: field-key) -> bool; /// Set all of the values for a key. Clears any existing values for that /// key, if they have been set. /// /// Fails with `header-error.immutable` if the `fields` are immutable. - /// - /// Fails with `header-error.invalid-syntax` if the `field-key` or any of - /// the `field-value`s are syntactically invalid. - @since(version = 0.2.0) set: func(name: field-key, value: list) -> result<_, header-error>; /// Delete all values for a key. Does nothing if no values for the key /// exist. /// /// Fails with `header-error.immutable` if the `fields` are immutable. - /// - /// Fails with `header-error.invalid-syntax` if the `field-key` is - /// syntactically invalid. - @since(version = 0.2.0) delete: func(name: field-key) -> result<_, header-error>; /// Append a value for a key. Does not change or delete any existing /// values for that key. /// /// Fails with `header-error.immutable` if the `fields` are immutable. - /// - /// Fails with `header-error.invalid-syntax` if the `field-key` or - /// `field-value` are syntactically invalid. - @since(version = 0.2.0) append: func(name: field-key, value: field-value) -> result<_, header-error>; /// Retrieve the full set of keys and values in the Fields. Like the @@ -233,42 +203,33 @@ interface types { /// The outer list represents each key-value pair in the Fields. Keys /// which have multiple values are represented by multiple entries in this /// list with the same key. - @since(version = 0.2.0) entries: func() -> list>; - /// Make a deep copy of the Fields. Equivalent in behavior to calling the + /// Make a deep copy of the Fields. Equivelant in behavior to calling the /// `fields` constructor on the return value of `entries`. The resulting /// `fields` is mutable. - @since(version = 0.2.0) clone: func() -> fields; } /// Headers is an alias for Fields. - @since(version = 0.2.0) type headers = fields; /// Trailers is an alias for Fields. - @since(version = 0.2.0) type trailers = fields; /// Represents an incoming HTTP Request. - @since(version = 0.2.0) resource incoming-request { /// Returns the method of the incoming request. - @since(version = 0.2.0) method: func() -> method; /// Returns the path with query parameters from the request, as a string. - @since(version = 0.2.0) path-with-query: func() -> option; /// Returns the protocol scheme from the request. - @since(version = 0.2.0) scheme: func() -> option; - /// Returns the authority of the Request's target URI, if present. - @since(version = 0.2.0) + /// Returns the authority from the request, if it was present. authority: func() -> option; /// Get the `headers` associated with the request. @@ -279,17 +240,14 @@ interface types { /// The `headers` returned are a child resource: it must be dropped before /// the parent `incoming-request` is dropped. Dropping this /// `incoming-request` before all children are dropped will trap. - @since(version = 0.2.0) headers: func() -> headers; /// Gives the `incoming-body` associated with this request. Will only /// return success at most once, and subsequent calls will return error. - @since(version = 0.2.0) consume: func() -> result; } /// Represents an outgoing HTTP Request. - @since(version = 0.2.0) resource outgoing-request { /// Construct a new `outgoing-request` with a default `method` of `GET`, and @@ -302,7 +260,6 @@ interface types { /// and `authority`, or `headers` which are not permitted to be sent. /// It is the obligation of the `outgoing-handler.handle` implementation /// to reject invalid constructions of `outgoing-request`. - @since(version = 0.2.0) constructor( headers: headers ); @@ -313,47 +270,38 @@ interface types { /// Returns success on the first call: the `outgoing-body` resource for /// this `outgoing-request` can be retrieved at most once. Subsequent /// calls will return error. - @since(version = 0.2.0) body: func() -> result; /// Get the Method for the Request. - @since(version = 0.2.0) method: func() -> method; /// Set the Method for the Request. Fails if the string present in a /// `method.other` argument is not a syntactically valid method. - @since(version = 0.2.0) set-method: func(method: method) -> result; /// Get the combination of the HTTP Path and Query for the Request. /// When `none`, this represents an empty Path and empty Query. - @since(version = 0.2.0) path-with-query: func() -> option; /// Set the combination of the HTTP Path and Query for the Request. /// When `none`, this represents an empty Path and empty Query. Fails is the /// string given is not a syntactically valid path and query uri component. - @since(version = 0.2.0) set-path-with-query: func(path-with-query: option) -> result; /// Get the HTTP Related Scheme for the Request. When `none`, the /// implementation may choose an appropriate default scheme. - @since(version = 0.2.0) scheme: func() -> option; /// Set the HTTP Related Scheme for the Request. When `none`, the /// implementation may choose an appropriate default scheme. Fails if the /// string given is not a syntactically valid uri scheme. - @since(version = 0.2.0) set-scheme: func(scheme: option) -> result; - /// Get the authority of the Request's target URI. A value of `none` may be used - /// with Related Schemes which do not require an authority. The HTTP and + /// Get the HTTP Authority for the Request. A value of `none` may be used + /// with Related Schemes which do not require an Authority. The HTTP and /// HTTPS schemes always require an authority. - @since(version = 0.2.0) authority: func() -> option; - /// Set the authority of the Request's target URI. A value of `none` may be used - /// with Related Schemes which do not require an authority. The HTTP and + /// Set the HTTP Authority for the Request. A value of `none` may be used + /// with Related Schemes which do not require an Authority. The HTTP and /// HTTPS schemes always require an authority. Fails if the string given is - /// not a syntactically valid URI authority. - @since(version = 0.2.0) + /// not a syntactically valid uri authority. set-authority: func(authority: option) -> result; /// Get the headers associated with the Request. @@ -362,9 +310,8 @@ interface types { /// `delete` operations will fail with `header-error.immutable`. /// /// This headers resource is a child: it must be dropped before the parent - /// `outgoing-request` is dropped, or its ownership is transferred to + /// `outgoing-request` is dropped, or its ownership is transfered to /// another component by e.g. `outgoing-handler.handle`. - @since(version = 0.2.0) headers: func() -> headers; } @@ -374,39 +321,31 @@ interface types { /// /// These timeouts are separate from any the user may use to bound a /// blocking call to `wasi:io/poll.poll`. - @since(version = 0.2.0) resource request-options { /// Construct a default `request-options` value. - @since(version = 0.2.0) constructor(); /// The timeout for the initial connect to the HTTP Server. - @since(version = 0.2.0) connect-timeout: func() -> option; /// Set the timeout for the initial connect to the HTTP Server. An error /// return value indicates that this timeout is not supported. - @since(version = 0.2.0) set-connect-timeout: func(duration: option) -> result; /// The timeout for receiving the first byte of the Response body. - @since(version = 0.2.0) first-byte-timeout: func() -> option; /// Set the timeout for receiving the first byte of the Response body. An /// error return value indicates that this timeout is not supported. - @since(version = 0.2.0) set-first-byte-timeout: func(duration: option) -> result; /// The timeout for receiving subsequent chunks of bytes in the Response /// body stream. - @since(version = 0.2.0) between-bytes-timeout: func() -> option; /// Set the timeout for receiving subsequent chunks of bytes in the Response /// body stream. An error return value indicates that this timeout is not /// supported. - @since(version = 0.2.0) set-between-bytes-timeout: func(duration: option) -> result; } @@ -415,7 +354,6 @@ interface types { /// This resource is used by the `wasi:http/incoming-handler` interface to /// allow a Response to be sent corresponding to the Request provided as the /// other argument to `incoming-handler.handle`. - @since(version = 0.2.0) resource response-outparam { /// Set the value of the `response-outparam` to either send a response, @@ -427,7 +365,6 @@ interface types { /// /// The user may provide an `error` to `response` to allow the /// implementation determine how to respond with an HTTP error response. - @since(version = 0.2.0) set: static func( param: response-outparam, response: result, @@ -435,15 +372,12 @@ interface types { } /// This type corresponds to the HTTP standard Status Code. - @since(version = 0.2.0) type status-code = u16; /// Represents an incoming HTTP Response. - @since(version = 0.2.0) resource incoming-response { /// Returns the status code from the incoming response. - @since(version = 0.2.0) status: func() -> status-code; /// Returns the headers from the incoming response. @@ -453,12 +387,10 @@ interface types { /// /// This headers resource is a child: it must be dropped before the parent /// `incoming-response` is dropped. - @since(version = 0.2.0) headers: func() -> headers; /// Returns the incoming body. May be called at most once. Returns error /// if called additional times. - @since(version = 0.2.0) consume: func() -> result; } @@ -470,7 +402,6 @@ interface types { /// an `input-stream` and the delivery of trailers as a `future-trailers`, /// and ensures that the user of this interface may only be consuming either /// the body contents or waiting on trailers at any given time. - @since(version = 0.2.0) resource incoming-body { /// Returns the contents of the body, as a stream of bytes. @@ -488,30 +419,26 @@ interface types { /// backpressure is to be applied when the user is consuming the body, /// and for that backpressure to not inhibit delivery of the trailers if /// the user does not read the entire body. - @since(version = 0.2.0) %stream: func() -> result; /// Takes ownership of `incoming-body`, and returns a `future-trailers`. /// This function will trap if the `input-stream` child is still alive. - @since(version = 0.2.0) finish: static func(this: incoming-body) -> future-trailers; } - /// Represents a future which may eventually return trailers, or an error. + /// Represents a future which may eventaully return trailers, or an error. /// /// In the case that the incoming HTTP Request or Response did not have any /// trailers, this future will resolve to the empty set of trailers once the /// complete Request or Response body has been received. - @since(version = 0.2.0) resource future-trailers { /// Returns a pollable which becomes ready when either the trailers have - /// been received, or an error has occurred. When this pollable is ready, + /// been received, or an error has occured. When this pollable is ready, /// the `get` method will return `some`. - @since(version = 0.2.0) subscribe: func() -> pollable; - /// Returns the contents of the trailers, or an error which occurred, + /// Returns the contents of the trailers, or an error which occured, /// once the future is ready. /// /// The outer `option` represents future readiness. Users can wait on this @@ -523,19 +450,17 @@ interface types { /// /// The inner `result` represents that either the HTTP Request or Response /// body, as well as any trailers, were received successfully, or that an - /// error occurred receiving them. The optional `trailers` indicates whether + /// error occured receiving them. The optional `trailers` indicates whether /// or not trailers were present in the body. /// /// When some `trailers` are returned by this method, the `trailers` /// resource is immutable, and a child. Use of the `set`, `append`, or /// `delete` methods will return an error, and the resource must be /// dropped before the parent `future-trailers` is dropped. - @since(version = 0.2.0) get: func() -> option, error-code>>>; } /// Represents an outgoing HTTP Response. - @since(version = 0.2.0) resource outgoing-response { /// Construct an `outgoing-response`, with a default `status-code` of `200`. @@ -543,16 +468,13 @@ interface types { /// `set-status-code` method. /// /// * `headers` is the HTTP Headers for the Response. - @since(version = 0.2.0) constructor(headers: headers); /// Get the HTTP Status Code for the Response. - @since(version = 0.2.0) status-code: func() -> status-code; /// Set the HTTP Status Code for the Response. Fails if the status-code /// given is not a valid http status code. - @since(version = 0.2.0) set-status-code: func(status-code: status-code) -> result; /// Get the headers associated with the Request. @@ -561,9 +483,8 @@ interface types { /// `delete` operations will fail with `header-error.immutable`. /// /// This headers resource is a child: it must be dropped before the parent - /// `outgoing-request` is dropped, or its ownership is transferred to + /// `outgoing-request` is dropped, or its ownership is transfered to /// another component by e.g. `outgoing-handler.handle`. - @since(version = 0.2.0) headers: func() -> headers; /// Returns the resource corresponding to the outgoing Body for this Response. @@ -571,7 +492,6 @@ interface types { /// Returns success on the first call: the `outgoing-body` resource for /// this `outgoing-response` can be retrieved at most once. Subsequent /// calls will return error. - @since(version = 0.2.0) body: func() -> result; } @@ -587,11 +507,10 @@ interface types { /// /// If the user code drops this resource, as opposed to calling the static /// method `finish`, the implementation should treat the body as incomplete, - /// and that an error has occurred. The implementation should propagate this + /// and that an error has occured. The implementation should propogate this /// error to the HTTP protocol by whatever means it has available, /// including: corrupting the body on the wire, aborting the associated /// Request, or sending a late status code for the Response. - @since(version = 0.2.0) resource outgoing-body { /// Returns a stream for writing the body contents. @@ -603,7 +522,6 @@ interface types { /// Returns success on the first call: the `output-stream` resource for /// this `outgoing-body` may be retrieved at most once. Subsequent calls /// will return error. - @since(version = 0.2.0) write: func() -> result; /// Finalize an outgoing body, optionally providing trailers. This must be @@ -615,24 +533,21 @@ interface types { /// constructed with a Content-Length header, and the contents written /// to the body (via `write`) does not match the value given in the /// Content-Length. - @since(version = 0.2.0) finish: static func( this: outgoing-body, trailers: option ) -> result<_, error-code>; } - /// Represents a future which may eventually return an incoming HTTP + /// Represents a future which may eventaully return an incoming HTTP /// Response, or an error. /// /// This resource is returned by the `wasi:http/outgoing-handler` interface to /// provide the HTTP Response corresponding to the sent Request. - @since(version = 0.2.0) resource future-incoming-response { /// Returns a pollable which becomes ready when either the Response has - /// been received, or an error has occurred. When this pollable is ready, + /// been received, or an error has occured. When this pollable is ready, /// the `get` method will return `some`. - @since(version = 0.2.0) subscribe: func() -> pollable; /// Returns the incoming HTTP Response, or an error, once one is ready. @@ -645,11 +560,11 @@ interface types { /// is `some`, and error on subsequent calls. /// /// The inner `result` represents that either the incoming HTTP Response - /// status and headers have received successfully, or that an error - /// occurred. Errors may also occur while consuming the response body, + /// status and headers have recieved successfully, or that an error + /// occured. Errors may also occur while consuming the response body, /// but those will be reported by the `incoming-body` and its /// `output-stream` child. - @since(version = 0.2.0) get: func() -> option>>; + } } diff --git a/examples/go/http/wit/deps/io/error.wit b/examples/go/http/wit/deps/io/error.wit index 4ea29c4..22e5b64 100644 --- a/examples/go/http/wit/deps/io/error.wit +++ b/examples/go/http/wit/deps/io/error.wit @@ -1,6 +1,6 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.0; + -@since(version = 0.2.0) interface error { /// A resource which represents some error information. /// @@ -11,15 +11,16 @@ interface error { /// `wasi:io/streams/stream-error` type. /// /// To provide more specific error information, other interfaces may - /// offer functions to "downcast" this error into more specific types. For example, - /// errors returned from streams derived from filesystem types can be described using - /// the filesystem's own error-code type. This is done using the function - /// `wasi:filesystem/types/filesystem-error-code`, which takes a `borrow` - /// parameter and returns an `option`. + /// provide functions to further "downcast" this error into more specific + /// error information. For example, `error`s returned in streams derived + /// from filesystem types to be described using the filesystem's own + /// error-code type, using the function + /// `wasi:filesystem/types/filesystem-error-code`, which takes a parameter + /// `borrow` and returns + /// `option`. /// /// The set of functions which can "downcast" an `error` into a more /// concrete type is open. - @since(version = 0.2.0) resource error { /// Returns a string that is suitable to assist humans in debugging /// this error. @@ -28,7 +29,6 @@ interface error { /// It may change across platforms, hosts, or other implementation /// details. Parsing this string is a major platform-compatibility /// hazard. - @since(version = 0.2.0) to-debug-string: func() -> string; } } diff --git a/examples/go/http/wit/deps/io/poll.wit b/examples/go/http/wit/deps/io/poll.wit index b25ac72..ddc67f8 100644 --- a/examples/go/http/wit/deps/io/poll.wit +++ b/examples/go/http/wit/deps/io/poll.wit @@ -1,17 +1,14 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.0; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. -@since(version = 0.2.0) interface poll { /// `pollable` represents a single I/O event which may be ready, or not. - @since(version = 0.2.0) resource pollable { /// Return the readiness of a pollable. This function never blocks. /// /// Returns `true` when the pollable is ready, and `false` otherwise. - @since(version = 0.2.0) ready: func() -> bool; /// `block` returns immediately if the pollable is ready, and otherwise @@ -19,7 +16,6 @@ interface poll { /// /// This function is equivalent to calling `poll.poll` on a list /// containing only this pollable. - @since(version = 0.2.0) block: func(); } @@ -31,9 +27,8 @@ interface poll { /// The result `list` contains one or more indices of handles in the /// argument list that is ready for I/O. /// - /// This function traps if either: - /// - the list is empty, or: - /// - the list contains more elements than can be indexed with a `u32` value. + /// If the list contains more elements than can be indexed with a `u32` + /// value, this function traps. /// /// A timeout can be implemented by adding a pollable from the /// wasi-clocks API to the list. @@ -41,7 +36,6 @@ interface poll { /// This function does not return a `result`; polling in itself does not /// do any I/O so it doesn't fail. If any of the I/O sources identified by /// the pollables has an error, it is indicated by marking the source as - /// being ready for I/O. - @since(version = 0.2.0) + /// being reaedy for I/O. poll: func(in: list>) -> list; } diff --git a/examples/go/http/wit/deps/io/streams.wit b/examples/go/http/wit/deps/io/streams.wit index b697e24..6d2f871 100644 --- a/examples/go/http/wit/deps/io/streams.wit +++ b/examples/go/http/wit/deps/io/streams.wit @@ -1,19 +1,15 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.0; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. /// /// In the future, the component model is expected to add built-in stream types; /// when it does, they are expected to subsume this API. -@since(version = 0.2.0) interface streams { - @since(version = 0.2.0) use error.{error}; - @since(version = 0.2.0) use poll.{pollable}; /// An error for input-stream and output-stream operations. - @since(version = 0.2.0) variant stream-error { /// The last operation (a write or flush) failed before completion. /// @@ -33,7 +29,6 @@ interface streams { /// available, which could even be zero. To wait for data to be available, /// use the `subscribe` function to obtain a `pollable` which can be polled /// for using `wasi:io/poll`. - @since(version = 0.2.0) resource input-stream { /// Perform a non-blocking read from the stream. /// @@ -61,7 +56,6 @@ interface streams { /// is not possible to allocate in wasm32, or not desirable to allocate as /// as a return value by the callee. The callee may return a list of bytes /// less than `len` in size while more bytes are available for reading. - @since(version = 0.2.0) read: func( /// The maximum number of bytes to read len: u64 @@ -69,7 +63,6 @@ interface streams { /// Read bytes from a stream, after blocking until at least one byte can /// be read. Except for blocking, behavior is identical to `read`. - @since(version = 0.2.0) blocking-read: func( /// The maximum number of bytes to read len: u64 @@ -79,7 +72,6 @@ interface streams { /// /// Behaves identical to `read`, except instead of returning a list /// of bytes, returns the number of bytes consumed from the stream. - @since(version = 0.2.0) skip: func( /// The maximum number of bytes to skip. len: u64, @@ -87,7 +79,6 @@ interface streams { /// Skip bytes from a stream, after blocking until at least one byte /// can be skipped. Except for blocking behavior, identical to `skip`. - @since(version = 0.2.0) blocking-skip: func( /// The maximum number of bytes to skip. len: u64, @@ -99,7 +90,6 @@ interface streams { /// The created `pollable` is a child resource of the `input-stream`. /// Implementations may trap if the `input-stream` is dropped before /// all derived `pollable`s created with this function are dropped. - @since(version = 0.2.0) subscribe: func() -> pollable; } @@ -112,11 +102,6 @@ interface streams { /// promptly, which could even be zero. To wait for the stream to be ready to /// accept data, the `subscribe` function to obtain a `pollable` which can be /// polled for using `wasi:io/poll`. - /// - /// Dropping an `output-stream` while there's still an active write in - /// progress may result in the data being lost. Before dropping the stream, - /// be sure to fully flush your writes. - @since(version = 0.2.0) resource output-stream { /// Check readiness for writing. This function never blocks. /// @@ -127,7 +112,6 @@ interface streams { /// When this function returns 0 bytes, the `subscribe` pollable will /// become ready when this function will report at least 1 byte, or an /// error. - @since(version = 0.2.0) check-write: func() -> result; /// Perform a write. This function never blocks. @@ -143,7 +127,6 @@ interface streams { /// /// returns Err(closed) without writing if the stream has closed since /// the last call to check-write provided a permit. - @since(version = 0.2.0) write: func( contents: list ) -> result<_, stream-error>; @@ -172,7 +155,6 @@ interface streams { /// // Check for any errors that arose during `flush` /// let _ = this.check-write(); // eliding error handling /// ``` - @since(version = 0.2.0) blocking-write-and-flush: func( contents: list ) -> result<_, stream-error>; @@ -187,16 +169,14 @@ interface streams { /// writes (`check-write` will return `ok(0)`) until the flush has /// completed. The `subscribe` pollable will become ready when the /// flush has completed and the stream can accept more writes. - @since(version = 0.2.0) flush: func() -> result<_, stream-error>; /// Request to flush buffered output, and block until flush completes /// and stream is ready for writing again. - @since(version = 0.2.0) blocking-flush: func() -> result<_, stream-error>; /// Create a `pollable` which will resolve once the output-stream - /// is ready for more writing, or an error has occurred. When this + /// is ready for more writing, or an error has occured. When this /// pollable is ready, `check-write` will return `ok(n)` with n>0, or an /// error. /// @@ -213,7 +193,6 @@ interface streams { /// preconditions (must use check-write first), but instead of /// passing a list of bytes, you simply pass the number of zero-bytes /// that should be written. - @since(version = 0.2.0) write-zeroes: func( /// The number of zero-bytes to write len: u64 @@ -243,7 +222,6 @@ interface streams { /// // Check for any errors that arose during `flush` /// let _ = this.check-write(); // eliding error handling /// ``` - @since(version = 0.2.0) blocking-write-zeroes-and-flush: func( /// The number of zero-bytes to write len: u64 @@ -251,7 +229,7 @@ interface streams { /// Read from one stream and write to another. /// - /// The behavior of splice is equivalent to: + /// The behavior of splice is equivelant to: /// 1. calling `check-write` on the `output-stream` /// 2. calling `read` on the `input-stream` with the smaller of the /// `check-write` permitted length and the `len` provided to `splice` @@ -262,7 +240,6 @@ interface streams { /// /// This function returns the number of bytes transferred; it may be less /// than `len`. - @since(version = 0.2.0) splice: func( /// The stream to read from src: borrow, @@ -275,7 +252,6 @@ interface streams { /// This is similar to `splice`, except that it blocks until the /// `output-stream` is ready for writing, and the `input-stream` /// is ready for reading, before performing the `splice`. - @since(version = 0.2.0) blocking-splice: func( /// The stream to read from src: borrow, diff --git a/examples/go/http/wit/deps/io/world.wit b/examples/go/http/wit/deps/io/world.wit index 6405a4e..5f0b43f 100644 --- a/examples/go/http/wit/deps/io/world.wit +++ b/examples/go/http/wit/deps/io/world.wit @@ -1,10 +1,6 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.0; -@since(version = 0.2.0) world imports { - @since(version = 0.2.0) import streams; - - @since(version = 0.2.0) import poll; } diff --git a/examples/go/http/wit/deps/random/insecure-seed.wit b/examples/go/http/wit/deps/random/insecure-seed.wit index 7e708dc..47210ac 100644 --- a/examples/go/http/wit/deps/random/insecure-seed.wit +++ b/examples/go/http/wit/deps/random/insecure-seed.wit @@ -1,9 +1,8 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.0; /// The insecure-seed interface for seeding hash-map DoS resistance. /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.2.0) interface insecure-seed { /// Return a 128-bit value that may contain a pseudo-random value. /// @@ -22,6 +21,5 @@ interface insecure-seed { /// This will likely be changed to a value import, to prevent it from being /// called multiple times and potentially used for purposes other than DoS /// protection. - @since(version = 0.2.0) insecure-seed: func() -> tuple; } diff --git a/examples/go/http/wit/deps/random/insecure.wit b/examples/go/http/wit/deps/random/insecure.wit index 3cdb53d..c58f4ee 100644 --- a/examples/go/http/wit/deps/random/insecure.wit +++ b/examples/go/http/wit/deps/random/insecure.wit @@ -1,9 +1,8 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.0; /// The insecure interface for insecure pseudo-random numbers. /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.2.0) interface insecure { /// Return `len` insecure pseudo-random bytes. /// @@ -13,13 +12,11 @@ interface insecure { /// There are no requirements on the values of the returned bytes, however /// implementations are encouraged to return evenly distributed values with /// a long period. - @since(version = 0.2.0) get-insecure-random-bytes: func(len: u64) -> list; /// Return an insecure pseudo-random `u64` value. /// /// This function returns the same type of pseudo-random data as /// `get-insecure-random-bytes`, represented as a `u64`. - @since(version = 0.2.0) get-insecure-random-u64: func() -> u64; } diff --git a/examples/go/http/wit/deps/random/random.wit b/examples/go/http/wit/deps/random/random.wit index 2b5035d..0c017f0 100644 --- a/examples/go/http/wit/deps/random/random.wit +++ b/examples/go/http/wit/deps/random/random.wit @@ -1,9 +1,8 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.0; /// WASI Random is a random data API. /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.2.0) interface random { /// Return `len` cryptographically-secure random or pseudo-random bytes. /// @@ -17,13 +16,11 @@ interface random { /// This function must always return fresh data. Deterministic environments /// must omit this function, rather than implementing it with deterministic /// data. - @since(version = 0.2.0) get-random-bytes: func(len: u64) -> list; /// Return a cryptographically-secure random or pseudo-random `u64` value. /// /// This function returns the same type of data as `get-random-bytes`, /// represented as a `u64`. - @since(version = 0.2.0) get-random-u64: func() -> u64; } diff --git a/examples/go/http/wit/deps/random/world.wit b/examples/go/http/wit/deps/random/world.wit index c615e96..3da3491 100644 --- a/examples/go/http/wit/deps/random/world.wit +++ b/examples/go/http/wit/deps/random/world.wit @@ -1,13 +1,7 @@ -package wasi:random@0.2.1; +package wasi:random@0.2.0; -@since(version = 0.2.0) world imports { - @since(version = 0.2.0) import random; - - @since(version = 0.2.0) import insecure; - - @since(version = 0.2.0) import insecure-seed; } diff --git a/examples/go/http/wit/deps/sockets/instance-network.wit b/examples/go/http/wit/deps/sockets/instance-network.wit index 5f6e6c1..e455d0f 100644 --- a/examples/go/http/wit/deps/sockets/instance-network.wit +++ b/examples/go/http/wit/deps/sockets/instance-network.wit @@ -1,11 +1,9 @@ /// This interface provides a value-export of the default network handle.. -@since(version = 0.2.0) interface instance-network { - @since(version = 0.2.0) use network.{network}; /// Get a handle to the default network. - @since(version = 0.2.0) instance-network: func() -> network; + } diff --git a/examples/go/http/wit/deps/sockets/ip-name-lookup.wit b/examples/go/http/wit/deps/sockets/ip-name-lookup.wit index dc56f30..8e639ec 100644 --- a/examples/go/http/wit/deps/sockets/ip-name-lookup.wit +++ b/examples/go/http/wit/deps/sockets/ip-name-lookup.wit @@ -1,10 +1,9 @@ -@since(version = 0.2.0) + interface ip-name-lookup { - @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; - @since(version = 0.2.0) + use wasi:io/poll@0.2.0.{pollable}; use network.{network, error-code, ip-address}; + /// Resolve an internet host name to a list of IP addresses. /// /// Unicode domain names are automatically converted to ASCII using IDNA encoding. @@ -25,10 +24,8 @@ interface ip-name-lookup { /// - /// - /// - - @since(version = 0.2.0) resolve-addresses: func(network: borrow, name: string) -> result; - @since(version = 0.2.0) resource resolve-address-stream { /// Returns the next address from the resolver. /// @@ -43,14 +40,12 @@ interface ip-name-lookup { /// - `temporary-resolver-failure`: A temporary failure in name resolution occurred. (EAI_AGAIN) /// - `permanent-resolver-failure`: A permanent failure in name resolution occurred. (EAI_FAIL) /// - `would-block`: A result is not available yet. (EWOULDBLOCK, EAGAIN) - @since(version = 0.2.0) resolve-next-address: func() -> result, error-code>; /// Create a `pollable` which will resolve once the stream is ready for I/O. /// /// Note: this function is here for WASI Preview2 only. /// It's planned to be removed when `future` is natively supported in Preview3. - @since(version = 0.2.0) subscribe: func() -> pollable; } } diff --git a/examples/go/http/wit/deps/sockets/network.wit b/examples/go/http/wit/deps/sockets/network.wit index 8c13b34..9cadf06 100644 --- a/examples/go/http/wit/deps/sockets/network.wit +++ b/examples/go/http/wit/deps/sockets/network.wit @@ -1,9 +1,8 @@ -@since(version = 0.2.0) + interface network { /// An opaque resource that represents access to (a subset of) the network. /// This enables context-based security for networking. /// There is no need for this to map 1:1 to a physical network interface. - @since(version = 0.2.0) resource network; /// Error codes. @@ -18,7 +17,6 @@ interface network { /// - `concurrency-conflict` /// /// See each individual API for what the POSIX equivalents are. They sometimes differ per API. - @since(version = 0.2.0) enum error-code { /// Unknown error unknown, @@ -105,7 +103,6 @@ interface network { permanent-resolver-failure, } - @since(version = 0.2.0) enum ip-address-family { /// Similar to `AF_INET` in POSIX. ipv4, @@ -114,18 +111,14 @@ interface network { ipv6, } - @since(version = 0.2.0) type ipv4-address = tuple; - @since(version = 0.2.0) type ipv6-address = tuple; - @since(version = 0.2.0) variant ip-address { ipv4(ipv4-address), ipv6(ipv6-address), } - @since(version = 0.2.0) record ipv4-socket-address { /// sin_port port: u16, @@ -133,7 +126,6 @@ interface network { address: ipv4-address, } - @since(version = 0.2.0) record ipv6-socket-address { /// sin6_port port: u16, @@ -145,9 +137,9 @@ interface network { scope-id: u32, } - @since(version = 0.2.0) variant ip-socket-address { ipv4(ipv4-socket-address), ipv6(ipv6-socket-address), } + } diff --git a/examples/go/http/wit/deps/sockets/tcp-create-socket.wit b/examples/go/http/wit/deps/sockets/tcp-create-socket.wit index eedbd30..c7ddf1f 100644 --- a/examples/go/http/wit/deps/sockets/tcp-create-socket.wit +++ b/examples/go/http/wit/deps/sockets/tcp-create-socket.wit @@ -1,8 +1,6 @@ -@since(version = 0.2.0) + interface tcp-create-socket { - @since(version = 0.2.0) use network.{network, error-code, ip-address-family}; - @since(version = 0.2.0) use tcp.{tcp-socket}; /// Create a new TCP socket. @@ -25,6 +23,5 @@ interface tcp-create-socket { /// - /// - /// - - @since(version = 0.2.0) create-tcp-socket: func(address-family: ip-address-family) -> result; } diff --git a/examples/go/http/wit/deps/sockets/tcp.wit b/examples/go/http/wit/deps/sockets/tcp.wit index bae5a29..5902b9e 100644 --- a/examples/go/http/wit/deps/sockets/tcp.wit +++ b/examples/go/http/wit/deps/sockets/tcp.wit @@ -1,15 +1,10 @@ -@since(version = 0.2.0) + interface tcp { - @since(version = 0.2.0) - use wasi:io/streams@0.2.1.{input-stream, output-stream}; - @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; - @since(version = 0.2.0) - use wasi:clocks/monotonic-clock@0.2.1.{duration}; - @since(version = 0.2.0) + use wasi:io/streams@0.2.0.{input-stream, output-stream}; + use wasi:io/poll@0.2.0.{pollable}; + use wasi:clocks/monotonic-clock@0.2.0.{duration}; use network.{network, error-code, ip-socket-address, ip-address-family}; - @since(version = 0.2.0) enum shutdown-type { /// Similar to `SHUT_RD` in POSIX. receive, @@ -32,8 +27,8 @@ interface tcp { /// - `connect-in-progress` /// - `connected` /// - `closed` - /// See - /// for more information. + /// See + /// for a more information. /// /// Note: Except where explicitly mentioned, whenever this documentation uses /// the term "bound" without backticks it actually means: in the `bound` state *or higher*. @@ -42,7 +37,6 @@ interface tcp { /// In addition to the general error codes documented on the /// `network::error-code` type, TCP socket methods may always return /// `error(invalid-state)` when in the `closed` state. - @since(version = 0.2.0) resource tcp-socket { /// Bind the socket to a specific network on the provided IP address and port. /// @@ -82,15 +76,13 @@ interface tcp { /// - /// - /// - - @since(version = 0.2.0) start-bind: func(network: borrow, local-address: ip-socket-address) -> result<_, error-code>; - @since(version = 0.2.0) finish-bind: func() -> result<_, error-code>; /// Connect to a remote endpoint. /// /// On success: - /// - the socket is transitioned into the `connected` state. + /// - the socket is transitioned into the `connection` state. /// - a pair of streams is returned that can be used to read & write to the connection /// /// After a failed connection attempt, the socket will be in the `closed` @@ -129,9 +121,7 @@ interface tcp { /// - /// - /// - - @since(version = 0.2.0) start-connect: func(network: borrow, remote-address: ip-socket-address) -> result<_, error-code>; - @since(version = 0.2.0) finish-connect: func() -> result, error-code>; /// Start listening for new connections. @@ -159,9 +149,7 @@ interface tcp { /// - /// - /// - - @since(version = 0.2.0) start-listen: func() -> result<_, error-code>; - @since(version = 0.2.0) finish-listen: func() -> result<_, error-code>; /// Accept a new client socket. @@ -190,7 +178,6 @@ interface tcp { /// - /// - /// - - @since(version = 0.2.0) accept: func() -> result, error-code>; /// Get the bound local address. @@ -209,7 +196,6 @@ interface tcp { /// - /// - /// - - @since(version = 0.2.0) local-address: func() -> result; /// Get the remote address. @@ -222,19 +208,16 @@ interface tcp { /// - /// - /// - - @since(version = 0.2.0) remote-address: func() -> result; /// Whether the socket is in the `listening` state. /// /// Equivalent to the SO_ACCEPTCONN socket option. - @since(version = 0.2.0) is-listening: func() -> bool; /// Whether this is a IPv4 or IPv6 socket. /// /// Equivalent to the SO_DOMAIN socket option. - @since(version = 0.2.0) address-family: func() -> ip-address-family; /// Hints the desired listen queue size. Implementations are free to ignore this. @@ -246,7 +229,6 @@ interface tcp { /// - `not-supported`: (set) The platform does not support changing the backlog size after the initial listen. /// - `invalid-argument`: (set) The provided value was 0. /// - `invalid-state`: (set) The socket is in the `connect-in-progress` or `connected` state. - @since(version = 0.2.0) set-listen-backlog-size: func(value: u64) -> result<_, error-code>; /// Enables or disables keepalive. @@ -258,9 +240,7 @@ interface tcp { /// These properties can be configured while `keep-alive-enabled` is false, but only come into effect when `keep-alive-enabled` is true. /// /// Equivalent to the SO_KEEPALIVE socket option. - @since(version = 0.2.0) keep-alive-enabled: func() -> result; - @since(version = 0.2.0) set-keep-alive-enabled: func(value: bool) -> result<_, error-code>; /// Amount of time the connection has to be idle before TCP starts sending keepalive packets. @@ -273,9 +253,7 @@ interface tcp { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.2.0) keep-alive-idle-time: func() -> result; - @since(version = 0.2.0) set-keep-alive-idle-time: func(value: duration) -> result<_, error-code>; /// The time between keepalive packets. @@ -288,9 +266,7 @@ interface tcp { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.2.0) keep-alive-interval: func() -> result; - @since(version = 0.2.0) set-keep-alive-interval: func(value: duration) -> result<_, error-code>; /// The maximum amount of keepalive packets TCP should send before aborting the connection. @@ -303,9 +279,7 @@ interface tcp { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.2.0) keep-alive-count: func() -> result; - @since(version = 0.2.0) set-keep-alive-count: func(value: u32) -> result<_, error-code>; /// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. @@ -314,9 +288,7 @@ interface tcp { /// /// # Typical errors /// - `invalid-argument`: (set) The TTL value must be 1 or higher. - @since(version = 0.2.0) hop-limit: func() -> result; - @since(version = 0.2.0) set-hop-limit: func(value: u8) -> result<_, error-code>; /// The kernel buffer space reserved for sends/receives on this socket. @@ -329,13 +301,9 @@ interface tcp { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.2.0) receive-buffer-size: func() -> result; - @since(version = 0.2.0) set-receive-buffer-size: func(value: u64) -> result<_, error-code>; - @since(version = 0.2.0) send-buffer-size: func() -> result; - @since(version = 0.2.0) set-send-buffer-size: func(value: u64) -> result<_, error-code>; /// Create a `pollable` which can be used to poll for, or block on, @@ -350,12 +318,11 @@ interface tcp { /// `subscribe` only has to be called once per socket and can then be /// (re)used for the remainder of the socket's lifetime. /// - /// See - /// for more information. + /// See + /// for a more information. /// /// Note: this function is here for WASI Preview2 only. /// It's planned to be removed when `future` is natively supported in Preview3. - @since(version = 0.2.0) subscribe: func() -> pollable; /// Initiate a graceful shutdown. @@ -368,7 +335,7 @@ interface tcp { /// associated with this socket will be closed and a FIN packet will be sent. /// - `both`: Same effect as `receive` & `send` combined. /// - /// This function is idempotent; shutting down a direction more than once + /// This function is idempotent. Shutting a down a direction more than once /// has no effect and returns `ok`. /// /// The shutdown function does not close (drop) the socket. @@ -381,7 +348,6 @@ interface tcp { /// - /// - /// - - @since(version = 0.2.0) shutdown: func(shutdown-type: shutdown-type) -> result<_, error-code>; } } diff --git a/examples/go/http/wit/deps/sockets/udp-create-socket.wit b/examples/go/http/wit/deps/sockets/udp-create-socket.wit index e8eeacb..0482d1f 100644 --- a/examples/go/http/wit/deps/sockets/udp-create-socket.wit +++ b/examples/go/http/wit/deps/sockets/udp-create-socket.wit @@ -1,8 +1,6 @@ -@since(version = 0.2.0) + interface udp-create-socket { - @since(version = 0.2.0) use network.{network, error-code, ip-address-family}; - @since(version = 0.2.0) use udp.{udp-socket}; /// Create a new UDP socket. @@ -25,6 +23,5 @@ interface udp-create-socket { /// - /// - /// - - @since(version = 0.2.0) create-udp-socket: func(address-family: ip-address-family) -> result; } diff --git a/examples/go/http/wit/deps/sockets/udp.wit b/examples/go/http/wit/deps/sockets/udp.wit index b289e49..d987a0a 100644 --- a/examples/go/http/wit/deps/sockets/udp.wit +++ b/examples/go/http/wit/deps/sockets/udp.wit @@ -1,12 +1,9 @@ -@since(version = 0.2.0) + interface udp { - @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; - @since(version = 0.2.0) + use wasi:io/poll@0.2.0.{pollable}; use network.{network, error-code, ip-socket-address, ip-address-family}; /// A received datagram. - @since(version = 0.2.0) record incoming-datagram { /// The payload. /// @@ -22,7 +19,6 @@ interface udp { } /// A datagram to be sent out. - @since(version = 0.2.0) record outgoing-datagram { /// The payload. data: list, @@ -37,8 +33,9 @@ interface udp { remote-address: option, } + + /// A UDP socket handle. - @since(version = 0.2.0) resource udp-socket { /// Bind the socket to a specific network on the provided IP address and port. /// @@ -66,9 +63,7 @@ interface udp { /// - /// - /// - - @since(version = 0.2.0) start-bind: func(network: borrow, local-address: ip-socket-address) -> result<_, error-code>; - @since(version = 0.2.0) finish-bind: func() -> result<_, error-code>; /// Set up inbound & outbound communication channels, optionally to a specific peer. @@ -111,7 +106,6 @@ interface udp { /// - /// - /// - - @since(version = 0.2.0) %stream: func(remote-address: option) -> result, error-code>; /// Get the current bound address. @@ -130,7 +124,6 @@ interface udp { /// - /// - /// - - @since(version = 0.2.0) local-address: func() -> result; /// Get the address the socket is currently streaming to. @@ -143,13 +136,11 @@ interface udp { /// - /// - /// - - @since(version = 0.2.0) remote-address: func() -> result; /// Whether this is a IPv4 or IPv6 socket. /// /// Equivalent to the SO_DOMAIN socket option. - @since(version = 0.2.0) address-family: func() -> ip-address-family; /// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. @@ -158,9 +149,7 @@ interface udp { /// /// # Typical errors /// - `invalid-argument`: (set) The TTL value must be 1 or higher. - @since(version = 0.2.0) unicast-hop-limit: func() -> result; - @since(version = 0.2.0) set-unicast-hop-limit: func(value: u8) -> result<_, error-code>; /// The kernel buffer space reserved for sends/receives on this socket. @@ -173,24 +162,18 @@ interface udp { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.2.0) receive-buffer-size: func() -> result; - @since(version = 0.2.0) set-receive-buffer-size: func(value: u64) -> result<_, error-code>; - @since(version = 0.2.0) send-buffer-size: func() -> result; - @since(version = 0.2.0) set-send-buffer-size: func(value: u64) -> result<_, error-code>; /// Create a `pollable` which will resolve once the socket is ready for I/O. /// /// Note: this function is here for WASI Preview2 only. /// It's planned to be removed when `future` is natively supported in Preview3. - @since(version = 0.2.0) subscribe: func() -> pollable; } - @since(version = 0.2.0) resource incoming-datagram-stream { /// Receive messages on the socket. /// @@ -215,18 +198,15 @@ interface udp { /// - /// - /// - - @since(version = 0.2.0) receive: func(max-results: u64) -> result, error-code>; /// Create a `pollable` which will resolve once the stream is ready to receive again. /// /// Note: this function is here for WASI Preview2 only. /// It's planned to be removed when `future` is natively supported in Preview3. - @since(version = 0.2.0) subscribe: func() -> pollable; } - @since(version = 0.2.0) resource outgoing-datagram-stream { /// Check readiness for sending. This function never blocks. /// @@ -275,14 +255,12 @@ interface udp { /// - /// - /// - - @since(version = 0.2.0) send: func(datagrams: list) -> result; /// Create a `pollable` which will resolve once the stream is ready to send again. /// /// Note: this function is here for WASI Preview2 only. /// It's planned to be removed when `future` is natively supported in Preview3. - @since(version = 0.2.0) subscribe: func() -> pollable; } } diff --git a/examples/go/http/wit/deps/sockets/world.wit b/examples/go/http/wit/deps/sockets/world.wit index a1d4267..f8bb92a 100644 --- a/examples/go/http/wit/deps/sockets/world.wit +++ b/examples/go/http/wit/deps/sockets/world.wit @@ -1,19 +1,11 @@ -package wasi:sockets@0.2.1; +package wasi:sockets@0.2.0; -@since(version = 0.2.0) world imports { - @since(version = 0.2.0) import instance-network; - @since(version = 0.2.0) import network; - @since(version = 0.2.0) import udp; - @since(version = 0.2.0) import udp-create-socket; - @since(version = 0.2.0) import tcp; - @since(version = 0.2.0) import tcp-create-socket; - @since(version = 0.2.0) import ip-name-lookup; }