mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 20:14:04 +00:00
internal/{cm,wasi}: regenerate WASI 0.2 bindings with wasm-tools-go v0.3.0
This commit is contained in:
@@ -9,6 +9,26 @@ import (
|
||||
"internal/wasi/sockets/v0.2.0/tcp"
|
||||
)
|
||||
|
||||
// Network represents the imported type alias "wasi:sockets/tcp-create-socket@0.2.0#network".
|
||||
//
|
||||
// See [network.Network] for more information.
|
||||
type Network = network.Network
|
||||
|
||||
// ErrorCode represents the type alias "wasi:sockets/tcp-create-socket@0.2.0#error-code".
|
||||
//
|
||||
// See [network.ErrorCode] for more information.
|
||||
type ErrorCode = network.ErrorCode
|
||||
|
||||
// IPAddressFamily represents the type alias "wasi:sockets/tcp-create-socket@0.2.0#ip-address-family".
|
||||
//
|
||||
// See [network.IPAddressFamily] for more information.
|
||||
type IPAddressFamily = network.IPAddressFamily
|
||||
|
||||
// TCPSocket represents the imported type alias "wasi:sockets/tcp-create-socket@0.2.0#tcp-socket".
|
||||
//
|
||||
// See [tcp.TCPSocket] for more information.
|
||||
type TCPSocket = tcp.TCPSocket
|
||||
|
||||
// CreateTCPSocket represents the imported function "create-tcp-socket".
|
||||
//
|
||||
// Create a new TCP socket.
|
||||
@@ -41,12 +61,8 @@ import (
|
||||
// error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func CreateTCPSocket(addressFamily network.IPAddressFamily) (result cm.Result[tcp.TCPSocket, tcp.TCPSocket, network.ErrorCode]) {
|
||||
func CreateTCPSocket(addressFamily IPAddressFamily) (result cm.Result[TCPSocket, TCPSocket, ErrorCode]) {
|
||||
addressFamily0 := (uint32)(addressFamily)
|
||||
wasmimport_CreateTCPSocket((uint32)(addressFamily0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//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])
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package tcpcreatesocket
|
||||
|
||||
import (
|
||||
"internal/cm"
|
||||
)
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:sockets@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp-create-socket@0.2.0 create-tcp-socket
|
||||
//go:noescape
|
||||
func wasmimport_CreateTCPSocket(addressFamily0 uint32, result *cm.Result[TCPSocket, TCPSocket, ErrorCode])
|
||||
Reference in New Issue
Block a user