internal/wasi: update to wasm-tools-go@v0.1.2 (#4326)

* internal/wasi: update to wasm-tools-go@v0.1.1

See https://github.com/ydnar/wasm-tools-go/releases/tag/v0.1.1 for additional information.

* internal/wasi: update to wasm-tools-go@v0.1.2

* internal/wasi: regenerate with wasm-tools-go@v0.1.3
This commit is contained in:
Randy Reddig
2024-07-08 22:09:47 +02:00
committed by GitHub
parent 5ca3e4a2da
commit 2d85fc6a64
18 changed files with 401 additions and 178 deletions
+28 -28
View File
@@ -105,7 +105,7 @@ func wasmimport_UDPSocketAddressFamily(self0 uint32) (result0 uint32)
// finish-bind: func() -> result<_, error-code>
//
//go:nosplit
func (self UDPSocket) FinishBind() (result cm.ErrResult[struct{}, network.ErrorCode]) {
func (self UDPSocket) FinishBind() (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
wasmimport_UDPSocketFinishBind((uint32)(self0), &result)
return
@@ -113,7 +113,7 @@ func (self UDPSocket) FinishBind() (result cm.ErrResult[struct{}, network.ErrorC
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.finish-bind
//go:noescape
func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
// LocalAddress represents the imported method "local-address".
//
@@ -138,7 +138,7 @@ func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.ErrResult[struct{},
// local-address: func() -> result<ip-socket-address, error-code>
//
//go:nosplit
func (self UDPSocket) LocalAddress() (result cm.OKResult[network.IPSocketAddress, network.ErrorCode]) {
func (self UDPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
wasmimport_UDPSocketLocalAddress((uint32)(self0), &result)
return
@@ -146,7 +146,7 @@ func (self UDPSocket) LocalAddress() (result cm.OKResult[network.IPSocketAddress
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.local-address
//go:noescape
func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.OKResult[network.IPSocketAddress, network.ErrorCode])
func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode])
// ReceiveBufferSize represents the imported method "receive-buffer-size".
//
@@ -166,7 +166,7 @@ func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.OKResult[network.
// receive-buffer-size: func() -> result<u64, error-code>
//
//go:nosplit
func (self UDPSocket) ReceiveBufferSize() (result cm.OKResult[uint64, network.ErrorCode]) {
func (self UDPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
wasmimport_UDPSocketReceiveBufferSize((uint32)(self0), &result)
return
@@ -174,7 +174,7 @@ func (self UDPSocket) ReceiveBufferSize() (result cm.OKResult[uint64, network.Er
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.receive-buffer-size
//go:noescape
func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
// RemoteAddress represents the imported method "remote-address".
//
@@ -192,7 +192,7 @@ func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.OKResult[uin
// remote-address: func() -> result<ip-socket-address, error-code>
//
//go:nosplit
func (self UDPSocket) RemoteAddress() (result cm.OKResult[network.IPSocketAddress, network.ErrorCode]) {
func (self UDPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
wasmimport_UDPSocketRemoteAddress((uint32)(self0), &result)
return
@@ -200,14 +200,14 @@ func (self UDPSocket) RemoteAddress() (result cm.OKResult[network.IPSocketAddres
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.remote-address
//go:noescape
func wasmimport_UDPSocketRemoteAddress(self0 uint32, result *cm.OKResult[network.IPSocketAddress, network.ErrorCode])
func wasmimport_UDPSocketRemoteAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode])
// SendBufferSize represents the imported method "send-buffer-size".
//
// send-buffer-size: func() -> result<u64, error-code>
//
//go:nosplit
func (self UDPSocket) SendBufferSize() (result cm.OKResult[uint64, network.ErrorCode]) {
func (self UDPSocket) SendBufferSize() (result cm.Result[uint64, uint64, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
wasmimport_UDPSocketSendBufferSize((uint32)(self0), &result)
return
@@ -215,14 +215,14 @@ func (self UDPSocket) SendBufferSize() (result cm.OKResult[uint64, network.Error
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.send-buffer-size
//go:noescape
func wasmimport_UDPSocketSendBufferSize(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
func wasmimport_UDPSocketSendBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
// SetReceiveBufferSize represents the imported method "set-receive-buffer-size".
//
// set-receive-buffer-size: func(value: u64) -> result<_, error-code>
//
//go:nosplit
func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.ErrResult[struct{}, network.ErrorCode]) {
func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
value0 := (uint64)(value)
wasmimport_UDPSocketSetReceiveBufferSize((uint32)(self0), (uint64)(value0), &result)
@@ -231,14 +231,14 @@ func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.ErrResult[st
//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.ErrResult[struct{}, network.ErrorCode])
func wasmimport_UDPSocketSetReceiveBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
// SetSendBufferSize represents the imported method "set-send-buffer-size".
//
// set-send-buffer-size: func(value: u64) -> result<_, error-code>
//
//go:nosplit
func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.ErrResult[struct{}, network.ErrorCode]) {
func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
value0 := (uint64)(value)
wasmimport_UDPSocketSetSendBufferSize((uint32)(self0), (uint64)(value0), &result)
@@ -247,14 +247,14 @@ func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.ErrResult[struc
//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.ErrResult[struct{}, network.ErrorCode])
func wasmimport_UDPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
// SetUnicastHopLimit represents the imported method "set-unicast-hop-limit".
//
// set-unicast-hop-limit: func(value: u8) -> result<_, error-code>
//
//go:nosplit
func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.ErrResult[struct{}, network.ErrorCode]) {
func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
value0 := (uint32)(value)
wasmimport_UDPSocketSetUnicastHopLimit((uint32)(self0), (uint32)(value0), &result)
@@ -263,7 +263,7 @@ func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.ErrResult[struc
//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.ErrResult[struct{}, network.ErrorCode])
func wasmimport_UDPSocketSetUnicastHopLimit(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
// StartBind represents the imported method "start-bind".
//
@@ -303,7 +303,7 @@ func wasmimport_UDPSocketSetUnicastHopLimit(self0 uint32, value0 uint32, result
// result<_, error-code>
//
//go:nosplit
func (self UDPSocket) StartBind(network_ network.Network, localAddress network.IPSocketAddress) (result cm.ErrResult[struct{}, network.ErrorCode]) {
func (self UDPSocket) StartBind(network_ network.Network, localAddress network.IPSocketAddress) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
network0 := cm.Reinterpret[uint32](network_)
localAddress0, localAddress1, localAddress2, localAddress3, localAddress4, localAddress5, localAddress6, localAddress7, localAddress8, localAddress9, localAddress10, localAddress11 := lower_IPSocketAddress(localAddress)
@@ -313,7 +313,7 @@ func (self UDPSocket) StartBind(network_ network.Network, localAddress network.I
//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.ErrResult[struct{}, network.ErrorCode])
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])
// Stream represents the imported method "stream".
//
@@ -372,7 +372,7 @@ func wasmimport_UDPSocketStartBind(self0 uint32, network0 uint32, localAddress0
// outgoing-datagram-stream>, error-code>
//
//go:nosplit
func (self UDPSocket) Stream(remoteAddress cm.Option[network.IPSocketAddress]) (result cm.OKResult[cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode]) {
func (self UDPSocket) Stream(remoteAddress cm.Option[network.IPSocketAddress]) (result cm.Result[TupleIncomingDatagramStreamOutgoingDatagramStreamShape, cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
remoteAddress0, remoteAddress1, remoteAddress2, remoteAddress3, remoteAddress4, remoteAddress5, remoteAddress6, remoteAddress7, remoteAddress8, remoteAddress9, remoteAddress10, remoteAddress11, remoteAddress12 := lower_OptionIPSocketAddress(remoteAddress)
wasmimport_UDPSocketStream((uint32)(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), &result)
@@ -381,7 +381,7 @@ func (self UDPSocket) Stream(remoteAddress cm.Option[network.IPSocketAddress]) (
//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.OKResult[cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode])
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])
// Subscribe represents the imported method "subscribe".
//
@@ -416,7 +416,7 @@ func wasmimport_UDPSocketSubscribe(self0 uint32) (result0 uint32)
// unicast-hop-limit: func() -> result<u8, error-code>
//
//go:nosplit
func (self UDPSocket) UnicastHopLimit() (result cm.OKResult[uint8, network.ErrorCode]) {
func (self UDPSocket) UnicastHopLimit() (result cm.Result[uint8, uint8, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
wasmimport_UDPSocketUnicastHopLimit((uint32)(self0), &result)
return
@@ -424,7 +424,7 @@ func (self UDPSocket) UnicastHopLimit() (result cm.OKResult[uint8, network.Error
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.unicast-hop-limit
//go:noescape
func wasmimport_UDPSocketUnicastHopLimit(self0 uint32, result *cm.OKResult[uint8, network.ErrorCode])
func wasmimport_UDPSocketUnicastHopLimit(self0 uint32, result *cm.Result[uint8, uint8, network.ErrorCode])
// IncomingDatagramStream represents the imported resource "wasi:sockets/udp@0.2.0#incoming-datagram-stream".
//
@@ -477,7 +477,7 @@ func wasmimport_IncomingDatagramStreamResourceDrop(self0 uint32)
// receive: func(max-results: u64) -> result<list<incoming-datagram>, error-code>
//
//go:nosplit
func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.OKResult[cm.List[IncomingDatagram], network.ErrorCode]) {
func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
maxResults0 := (uint64)(maxResults)
wasmimport_IncomingDatagramStreamReceive((uint32)(self0), (uint64)(maxResults0), &result)
@@ -486,7 +486,7 @@ func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.OKResul
//go:wasmimport wasi:sockets/udp@0.2.0 [method]incoming-datagram-stream.receive
//go:noescape
func wasmimport_IncomingDatagramStreamReceive(self0 uint32, maxResults0 uint64, result *cm.OKResult[cm.List[IncomingDatagram], network.ErrorCode])
func wasmimport_IncomingDatagramStreamReceive(self0 uint32, maxResults0 uint64, result *cm.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], network.ErrorCode])
// Subscribe represents the imported method "subscribe".
//
@@ -546,7 +546,7 @@ func wasmimport_OutgoingDatagramStreamResourceDrop(self0 uint32)
// check-send: func() -> result<u64, error-code>
//
//go:nosplit
func (self OutgoingDatagramStream) CheckSend() (result cm.OKResult[uint64, network.ErrorCode]) {
func (self OutgoingDatagramStream) CheckSend() (result cm.Result[uint64, uint64, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
wasmimport_OutgoingDatagramStreamCheckSend((uint32)(self0), &result)
return
@@ -554,7 +554,7 @@ func (self OutgoingDatagramStream) CheckSend() (result cm.OKResult[uint64, netwo
//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.check-send
//go:noescape
func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
// Send represents the imported method "send".
//
@@ -610,7 +610,7 @@ func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.OKResul
// send: func(datagrams: list<outgoing-datagram>) -> result<u64, error-code>
//
//go:nosplit
func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (result cm.OKResult[uint64, network.ErrorCode]) {
func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (result cm.Result[uint64, uint64, network.ErrorCode]) {
self0 := cm.Reinterpret[uint32](self)
datagrams0, datagrams1 := cm.LowerList(datagrams)
wasmimport_OutgoingDatagramStreamSend((uint32)(self0), (*OutgoingDatagram)(datagrams0), (uint32)(datagrams1), &result)
@@ -619,7 +619,7 @@ func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (re
//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.OKResult[uint64, network.ErrorCode])
func wasmimport_OutgoingDatagramStreamSend(self0 uint32, datagrams0 *OutgoingDatagram, datagrams1 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
// Subscribe represents the imported method "subscribe".
//