From 4c44291126714f61a8232853a2d6e42b34ec2c39 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 12 Feb 2024 13:57:15 -0700 Subject: [PATCH] split `component new` rule out of link rule for Preview 2 We now explicitly distinquish between core module files (%.core.wasm) and component files (%.wasm), which helps avoid the trickery in my previous commit. In order to test this properly, I needed to update the Wasmtime URL to point to v17.0.0 instead of dev (which we needed to do anyway), and that in turn required updating the bindings to use the final WASI 0.2.0 release. Signed-off-by: Joel Dice --- Makefile | 65 ++- .../wasm32-wasi-preview2/defined-symbols.txt | 5 - .../undefined-symbols.txt | 4 - .../headers/public/wasi/preview2.h | 251 +++++------ libc-bottom-half/sources/preview2.c | 396 ++++++------------ .../sources/preview2_component_type.o | Bin 11416 -> 10849 bytes test/Makefile | 28 +- 7 files changed, 315 insertions(+), 434 deletions(-) diff --git a/Makefile b/Makefile index b6d66ef1..5a5f754b 100644 --- a/Makefile +++ b/Makefile @@ -26,14 +26,10 @@ OBJDIR ?= build/$(TARGET_TRIPLE) # The directory where we store files and tools for generating WASI Preview 2 bindings BINDING_WORK_DIR ?= build/bindings # URL from which to retrieve the WIT files used to generate the WASI Preview 2 bindings -WASI_CLI_URL ?= https://github.com/WebAssembly/wasi-cli/archive/refs/tags/v0.2.0-rc-2023-12-05.tar.gz +WASI_CLI_URL ?= https://github.com/WebAssembly/wasi-cli/archive/refs/tags/v0.2.0.tar.gz # URL from which to retrieve the `wit-bindgen` command used to generate the WASI # Preview 2 bindings. -# -# TODO: Switch to bytecodealliance/wit-bindgen 0.17.0 once it's released (which -# will include https://github.com/bytecodealliance/wit-bindgen/pull/804 and -# https://github.com/bytecodealliance/wit-bindgen/pull/805, which we rely on) -WIT_BINDGEN_URL ?= https://github.com/dicej/wit-bindgen/releases/download/wit-bindgen-cli-0.17.0-dicej-pre0/wit-bindgen-v0.17.0-dicej-pre0-x86_64-linux.tar.gz +WIT_BINDGEN_URL ?= https://github.com/bytecodealliance/wit-bindgen/releases/download/wit-bindgen-cli-0.17.0/wit-bindgen-v0.17.0-x86_64-linux.tar.gz # When the length is no larger than this threshold, we consider the # overhead of bulk memory opcodes to outweigh the performance benefit, @@ -853,36 +849,37 @@ $(BINDING_WORK_DIR)/wit-bindgen: bindings: $(BINDING_WORK_DIR)/wasi-cli $(BINDING_WORK_DIR)/wit-bindgen cd "$(BINDING_WORK_DIR)" && \ ./wit-bindgen/wit-bindgen c \ + --autodrop-borrows yes \ --rename-world preview2 \ --type-section-suffix __wasi_libc \ - --world wasi:cli/imports@0.2.0-rc-2023-12-05 \ - --rename wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10=monotonic_clock \ - --rename wasi:clocks/wall-clock@0.2.0-rc-2023-11-10=wall_clock \ - --rename wasi:filesystem/preopens@0.2.0-rc-2023-11-10=filesystem_preopens \ - --rename wasi:filesystem/types@0.2.0-rc-2023-11-10=filesystem \ - --rename wasi:io/error@0.2.0-rc-2023-11-10=io_error \ - --rename wasi:io/poll@0.2.0-rc-2023-11-10=poll \ - --rename wasi:io/streams@0.2.0-rc-2023-11-10=streams \ - --rename wasi:random/insecure-seed@0.2.0-rc-2023-11-10=random_insecure_seed \ - --rename wasi:random/insecure@0.2.0-rc-2023-11-10=random_insecure \ - --rename wasi:random/random@0.2.0-rc-2023-11-10=random \ - --rename wasi:sockets/instance-network@0.2.0-rc-2023-11-10=instance_network \ - --rename wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10=ip_name_lookup \ - --rename wasi:sockets/network@0.2.0-rc-2023-11-10=network \ - --rename wasi:sockets/tcp-create-socket@0.2.0-rc-2023-11-10=tcp_create_socket \ - --rename wasi:sockets/tcp@0.2.0-rc-2023-11-10=tcp \ - --rename wasi:sockets/udp-create-socket@0.2.0-rc-2023-11-10=udp_create_socket \ - --rename wasi:sockets/udp@0.2.0-rc-2023-11-10=udp \ - --rename wasi:cli/environment@0.2.0-rc-2023-12-05=environment \ - --rename wasi:cli/exit@0.2.0-rc-2023-12-05=exit \ - --rename wasi:cli/stdin@0.2.0-rc-2023-12-05=stdin \ - --rename wasi:cli/stdout@0.2.0-rc-2023-12-05=stdout \ - --rename wasi:cli/stderr@0.2.0-rc-2023-12-05=stderr \ - --rename wasi:cli/terminal-input@0.2.0-rc-2023-12-05=terminal_input \ - --rename wasi:cli/terminal-output@0.2.0-rc-2023-12-05=terminal_output \ - --rename wasi:cli/terminal-stdin@0.2.0-rc-2023-12-05=terminal_stdin \ - --rename wasi:cli/terminal-stdout@0.2.0-rc-2023-12-05=terminal_stdout \ - --rename wasi:cli/terminal-stderr@0.2.0-rc-2023-12-05=terminal_stderr \ + --world wasi:cli/imports@0.2.0 \ + --rename wasi:clocks/monotonic-clock@0.2.0=monotonic_clock \ + --rename wasi:clocks/wall-clock@0.2.0=wall_clock \ + --rename wasi:filesystem/preopens@0.2.0=filesystem_preopens \ + --rename wasi:filesystem/types@0.2.0=filesystem \ + --rename wasi:io/error@0.2.0=io_error \ + --rename wasi:io/poll@0.2.0=poll \ + --rename wasi:io/streams@0.2.0=streams \ + --rename wasi:random/insecure-seed@0.2.0=random_insecure_seed \ + --rename wasi:random/insecure@0.2.0=random_insecure \ + --rename wasi:random/random@0.2.0=random \ + --rename wasi:sockets/instance-network@0.2.0=instance_network \ + --rename wasi:sockets/ip-name-lookup@0.2.0=ip_name_lookup \ + --rename wasi:sockets/network@0.2.0=network \ + --rename wasi:sockets/tcp-create-socket@0.2.0=tcp_create_socket \ + --rename wasi:sockets/tcp@0.2.0=tcp \ + --rename wasi:sockets/udp-create-socket@0.2.0=udp_create_socket \ + --rename wasi:sockets/udp@0.2.0=udp \ + --rename wasi:cli/environment@0.2.0=environment \ + --rename wasi:cli/exit@0.2.0=exit \ + --rename wasi:cli/stdin@0.2.0=stdin \ + --rename wasi:cli/stdout@0.2.0=stdout \ + --rename wasi:cli/stderr@0.2.0=stderr \ + --rename wasi:cli/terminal-input@0.2.0=terminal_input \ + --rename wasi:cli/terminal-output@0.2.0=terminal_output \ + --rename wasi:cli/terminal-stdin@0.2.0=terminal_stdin \ + --rename wasi:cli/terminal-stdout@0.2.0=terminal_stdout \ + --rename wasi:cli/terminal-stderr@0.2.0=terminal_stderr \ ./wasi-cli/wit && \ mv preview2.h ../../libc-bottom-half/headers/public/wasi/ && \ mv preview2_component_type.o ../../libc-bottom-half/sources && \ diff --git a/expected/wasm32-wasi-preview2/defined-symbols.txt b/expected/wasm32-wasi-preview2/defined-symbols.txt index dea0473c..33789799 100644 --- a/expected/wasm32-wasi-preview2/defined-symbols.txt +++ b/expected/wasm32-wasi-preview2/defined-symbols.txt @@ -1234,7 +1234,6 @@ tcp_method_tcp_socket_finish_bind tcp_method_tcp_socket_finish_connect tcp_method_tcp_socket_finish_listen tcp_method_tcp_socket_hop_limit -tcp_method_tcp_socket_ipv6_only tcp_method_tcp_socket_is_listening tcp_method_tcp_socket_keep_alive_count tcp_method_tcp_socket_keep_alive_enabled @@ -1245,7 +1244,6 @@ tcp_method_tcp_socket_receive_buffer_size tcp_method_tcp_socket_remote_address tcp_method_tcp_socket_send_buffer_size tcp_method_tcp_socket_set_hop_limit -tcp_method_tcp_socket_set_ipv6_only tcp_method_tcp_socket_set_keep_alive_count tcp_method_tcp_socket_set_keep_alive_enabled tcp_method_tcp_socket_set_keep_alive_idle_time @@ -1328,12 +1326,10 @@ udp_method_outgoing_datagram_stream_send udp_method_outgoing_datagram_stream_subscribe udp_method_udp_socket_address_family udp_method_udp_socket_finish_bind -udp_method_udp_socket_ipv6_only udp_method_udp_socket_local_address udp_method_udp_socket_receive_buffer_size udp_method_udp_socket_remote_address udp_method_udp_socket_send_buffer_size -udp_method_udp_socket_set_ipv6_only udp_method_udp_socket_set_receive_buffer_size udp_method_udp_socket_set_send_buffer_size udp_method_udp_socket_set_unicast_hop_limit @@ -1345,7 +1341,6 @@ udp_option_ip_socket_address_free udp_outgoing_datagram_free udp_outgoing_datagram_stream_drop_borrow udp_outgoing_datagram_stream_drop_own -udp_result_bool_error_code_free udp_result_ip_socket_address_error_code_free udp_result_list_incoming_datagram_error_code_free udp_result_tuple2_own_incoming_datagram_stream_own_outgoing_datagram_stream_error_code_free diff --git a/expected/wasm32-wasi-preview2/undefined-symbols.txt b/expected/wasm32-wasi-preview2/undefined-symbols.txt index c19715b4..710e8116 100644 --- a/expected/wasm32-wasi-preview2/undefined-symbols.txt +++ b/expected/wasm32-wasi-preview2/undefined-symbols.txt @@ -151,7 +151,6 @@ __wasm_import_tcp_method_tcp_socket_finish_bind __wasm_import_tcp_method_tcp_socket_finish_connect __wasm_import_tcp_method_tcp_socket_finish_listen __wasm_import_tcp_method_tcp_socket_hop_limit -__wasm_import_tcp_method_tcp_socket_ipv6_only __wasm_import_tcp_method_tcp_socket_is_listening __wasm_import_tcp_method_tcp_socket_keep_alive_count __wasm_import_tcp_method_tcp_socket_keep_alive_enabled @@ -162,7 +161,6 @@ __wasm_import_tcp_method_tcp_socket_receive_buffer_size __wasm_import_tcp_method_tcp_socket_remote_address __wasm_import_tcp_method_tcp_socket_send_buffer_size __wasm_import_tcp_method_tcp_socket_set_hop_limit -__wasm_import_tcp_method_tcp_socket_set_ipv6_only __wasm_import_tcp_method_tcp_socket_set_keep_alive_count __wasm_import_tcp_method_tcp_socket_set_keep_alive_enabled __wasm_import_tcp_method_tcp_socket_set_keep_alive_idle_time @@ -190,12 +188,10 @@ __wasm_import_udp_method_outgoing_datagram_stream_send __wasm_import_udp_method_outgoing_datagram_stream_subscribe __wasm_import_udp_method_udp_socket_address_family __wasm_import_udp_method_udp_socket_finish_bind -__wasm_import_udp_method_udp_socket_ipv6_only __wasm_import_udp_method_udp_socket_local_address __wasm_import_udp_method_udp_socket_receive_buffer_size __wasm_import_udp_method_udp_socket_remote_address __wasm_import_udp_method_udp_socket_send_buffer_size -__wasm_import_udp_method_udp_socket_set_ipv6_only __wasm_import_udp_method_udp_socket_set_receive_buffer_size __wasm_import_udp_method_udp_socket_set_send_buffer_size __wasm_import_udp_method_udp_socket_set_unicast_hop_limit diff --git a/libc-bottom-half/headers/public/wasi/preview2.h b/libc-bottom-half/headers/public/wasi/preview2.h index f54f1d42..821eb897 100644 --- a/libc-bottom-half/headers/public/wasi/preview2.h +++ b/libc-bottom-half/headers/public/wasi/preview2.h @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.16.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.17.0. DO NOT EDIT! #ifndef __BINDINGS_PREVIEW2_H #define __BINDINGS_PREVIEW2_H #ifdef __cplusplus @@ -669,12 +669,14 @@ typedef uint8_t network_error_code_t; #define NETWORK_ERROR_CODE_ADDRESS_IN_USE 12 // The remote address is not reachable #define NETWORK_ERROR_CODE_REMOTE_UNREACHABLE 13 -// The connection was forcefully rejected +// The TCP connection was forcefully rejected #define NETWORK_ERROR_CODE_CONNECTION_REFUSED 14 -// The connection was reset. +// The TCP connection was reset. #define NETWORK_ERROR_CODE_CONNECTION_RESET 15 -// A connection was aborted. +// A TCP connection was aborted. #define NETWORK_ERROR_CODE_CONNECTION_ABORTED 16 +// The size of a datagram sent to a UDP socket exceeded the maximum +// supported size. #define NETWORK_ERROR_CODE_DATAGRAM_TOO_LARGE 17 // Name does not exist or has no suitable associated IP addresses. #define NETWORK_ERROR_CODE_NAME_UNRESOLVABLE 18 @@ -720,14 +722,20 @@ typedef struct { #define NETWORK_IP_ADDRESS_IPV6 1 typedef struct { + // sin_port uint16_t port; + // sin_addr network_ipv4_address_t address; } network_ipv4_socket_address_t; typedef struct { + // sin6_port uint16_t port; + // sin6_flowinfo uint32_t flow_info; + // sin6_addr network_ipv6_address_t address; + // sin6_scope_id uint32_t scope_id; } network_ipv6_socket_address_t; @@ -837,14 +845,6 @@ typedef struct { } val; } udp_result_ip_socket_address_error_code_t; -typedef struct { - bool is_err; - union { - bool ok; - udp_error_code_t err; - } val; -} udp_result_bool_error_code_t; - typedef struct { bool is_err; union { @@ -1066,7 +1066,7 @@ typedef struct { uint64_t f1; } preview2_tuple2_u64_u64_t; -// Imported Functions from `wasi:cli/environment@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/environment@0.2.0` // Get the POSIX-style environment variables. // // Each environment variable is provided as a pair of string variable names @@ -1082,11 +1082,11 @@ extern void environment_get_arguments(preview2_list_string_t *ret); // directory, interpreting `.` as shorthand for this. extern bool environment_initial_cwd(preview2_string_t *ret); -// Imported Functions from `wasi:cli/exit@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/exit@0.2.0` // Exit the current instance and any linked instances. extern void exit_exit(exit_result_void_void_t *status); -// Imported Functions from `wasi:io/error@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:io/error@0.2.0` // Returns a string that is suitable to assist humans in debugging // this error. // @@ -1096,7 +1096,7 @@ extern void exit_exit(exit_result_void_void_t *status); // hazard. extern void io_error_method_error_to_debug_string(io_error_borrow_error_t self, preview2_string_t *ret); -// Imported Functions from `wasi:io/poll@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:io/poll@0.2.0` // Return the readiness of a pollable. This function never blocks. // // Returns `true` when the pollable is ready, and `false` otherwise. @@ -1127,9 +1127,14 @@ extern void poll_method_pollable_block(poll_borrow_pollable_t self); // being reaedy for I/O. extern void poll_poll(poll_list_borrow_pollable_t *in, preview2_list_u32_t *ret); -// Imported Functions from `wasi:io/streams@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:io/streams@0.2.0` // Perform a non-blocking read from the stream. // +// When the source of a `read` is binary data, the bytes from the source +// are returned verbatim. When the source of a `read` is known to the +// implementation to be text, bytes containing the UTF-8 encoding of the +// text are returned. +// // This function returns a list of bytes containing the read data, // when successful. The returned list will contain up to `len` bytes; // it may return fewer than requested, but not more. The list is @@ -1180,6 +1185,12 @@ extern streams_own_pollable_t streams_method_input_stream_subscribe(streams_borr extern bool streams_method_output_stream_check_write(streams_borrow_output_stream_t self, uint64_t *ret, streams_stream_error_t *err); // Perform a write. This function never blocks. // +// When the destination of a `write` is binary data, the bytes from +// `contents` are written verbatim. When the destination of a `write` is +// known to the implementation to be text, the bytes of `contents` are +// transcoded from UTF-8 into the encoding of the destination and then +// written. +// // Precondition: check-write gave permit of Ok(n) and contents has a // length of less than or equal to n. Otherwise, this function will trap. // @@ -1289,31 +1300,31 @@ extern bool streams_method_output_stream_splice(streams_borrow_output_stream_t s // is ready for reading, before performing the `splice`. extern bool streams_method_output_stream_blocking_splice(streams_borrow_output_stream_t self, streams_borrow_input_stream_t src, uint64_t len, uint64_t *ret, streams_stream_error_t *err); -// Imported Functions from `wasi:cli/stdin@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/stdin@0.2.0` extern stdin_own_input_stream_t stdin_get_stdin(void); -// Imported Functions from `wasi:cli/stdout@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/stdout@0.2.0` extern stdout_own_output_stream_t stdout_get_stdout(void); -// Imported Functions from `wasi:cli/stderr@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/stderr@0.2.0` extern stderr_own_output_stream_t stderr_get_stderr(void); -// Imported Functions from `wasi:cli/terminal-stdin@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/terminal-stdin@0.2.0` // If stdin is connected to a terminal, return a `terminal-input` handle // allowing further interaction with it. extern bool terminal_stdin_get_terminal_stdin(terminal_stdin_own_terminal_input_t *ret); -// Imported Functions from `wasi:cli/terminal-stdout@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/terminal-stdout@0.2.0` // If stdout is connected to a terminal, return a `terminal-output` handle // allowing further interaction with it. extern bool terminal_stdout_get_terminal_stdout(terminal_stdout_own_terminal_output_t *ret); -// Imported Functions from `wasi:cli/terminal-stderr@0.2.0-rc-2023-12-05` +// Imported Functions from `wasi:cli/terminal-stderr@0.2.0` // If stderr is connected to a terminal, return a `terminal-output` handle // allowing further interaction with it. extern bool terminal_stderr_get_terminal_stderr(terminal_stderr_own_terminal_output_t *ret); -// Imported Functions from `wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:clocks/monotonic-clock@0.2.0` // Read the current value of the clock. // // The clock is monotonic, therefore calling this function repeatedly will @@ -1330,7 +1341,7 @@ extern monotonic_clock_own_pollable_t monotonic_clock_subscribe_instant(monotoni // occured. extern monotonic_clock_own_pollable_t monotonic_clock_subscribe_duration(monotonic_clock_duration_t when); -// Imported Functions from `wasi:clocks/wall-clock@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:clocks/wall-clock@0.2.0` // Read the current value of the clock. // // This clock is not monotonic, therefore calling this function repeatedly @@ -1350,7 +1361,7 @@ extern void wall_clock_now(wall_clock_datetime_t *ret); // The nanoseconds field of the output is always less than 1000000000. extern void wall_clock_resolution(wall_clock_datetime_t *ret); -// Imported Functions from `wasi:filesystem/types@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:filesystem/types@0.2.0` // Return a stream for reading from a file, if available. // // May fail with an error-code describing why the file cannot be read. @@ -1580,34 +1591,36 @@ extern bool filesystem_method_directory_entry_stream_read_directory_entry(filesy // errors are filesystem-related errors. extern bool filesystem_filesystem_error_code(filesystem_borrow_error_t err_, filesystem_error_code_t *ret); -// Imported Functions from `wasi:filesystem/preopens@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:filesystem/preopens@0.2.0` // Return the set of preopened directories, and their path. extern void filesystem_preopens_get_directories(filesystem_preopens_list_tuple2_own_descriptor_string_t *ret); -// Imported Functions from `wasi:sockets/instance-network@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:sockets/instance-network@0.2.0` // Get a handle to the default network. extern instance_network_own_network_t instance_network_instance_network(void); -// Imported Functions from `wasi:sockets/udp@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:sockets/udp@0.2.0` // Bind the socket to a specific network on the provided IP address and port. // // If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is left to the implementation to decide which // network interface(s) to bind to. // If the port is zero, the socket will be bound to a random free port. // -// Unlike in POSIX, this function is async. This enables interactive WASI hosts to inject permission prompts. -// -// # Typical `start` errors +// # Typical errors // - `invalid-argument`: The `local-address` has the wrong address family. (EAFNOSUPPORT, EFAULT on Windows) // - `invalid-state`: The socket is already bound. (EINVAL) -// -// # Typical `finish` errors // - `address-in-use`: No ephemeral ports available. (EADDRINUSE, ENOBUFS on Windows) // - `address-in-use`: Address is already in use. (EADDRINUSE) // - `address-not-bindable`: `local-address` is not an address that the `network` can bind to. (EADDRNOTAVAIL) // - `not-in-progress`: A `bind` operation is not in progress. // - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN) // +// # Implementors note +// Unlike in POSIX, in WASI the bind operation is async. This enables +// interactive WASI hosts to inject permission prompts. Runtimes that +// don't want to make use of this ability can simply call the native +// `bind` as part of either `start-bind` or `finish-bind`. +// // # References // - // - @@ -1643,7 +1656,6 @@ extern bool udp_method_udp_socket_finish_bind(udp_borrow_udp_socket_t self, udp_ // // # Typical errors // - `invalid-argument`: The `remote-address` has the wrong address family. (EAFNOSUPPORT) -// - `invalid-argument`: `remote-address` is a non-IPv4-mapped IPv6 address, but the socket was bound to a specific IPv4-mapped IPv6 address. (or vice versa) // - `invalid-argument`: The IP address in `remote-address` is set to INADDR_ANY (`0.0.0.0` / `::`). (EDESTADDRREQ, EADDRNOTAVAIL) // - `invalid-argument`: The port in `remote-address` is set to 0. (EDESTADDRREQ, EADDRNOTAVAIL) // - `invalid-state`: The socket is not bound. @@ -1689,16 +1701,6 @@ extern bool udp_method_udp_socket_remote_address(udp_borrow_udp_socket_t self, u // // Equivalent to the SO_DOMAIN socket option. extern udp_ip_address_family_t udp_method_udp_socket_address_family(udp_borrow_udp_socket_t self); -// Whether IPv4 compatibility (dual-stack) mode is disabled or not. -// -// Equivalent to the IPV6_V6ONLY socket option. -// -// # Typical errors -// - `not-supported`: (get/set) `this` socket is an IPv4 socket. -// - `invalid-state`: (set) The socket is already bound. -// - `not-supported`: (set) Host does not support dual-stack sockets. (Implementations are not required to.) -extern bool udp_method_udp_socket_ipv6_only(udp_borrow_udp_socket_t self, bool *ret, udp_error_code_t *err); -extern bool udp_method_udp_socket_set_ipv6_only(udp_borrow_udp_socket_t self, bool value, udp_error_code_t *err); // Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. // // If the provided value is 0, an `invalid-argument` error is returned. @@ -1784,7 +1786,6 @@ extern bool udp_method_outgoing_datagram_stream_check_send(udp_borrow_outgoing_d // // # Typical errors // - `invalid-argument`: The `remote-address` has the wrong address family. (EAFNOSUPPORT) -// - `invalid-argument`: `remote-address` is a non-IPv4-mapped IPv6 address, but the socket was bound to a specific IPv4-mapped IPv6 address. (or vice versa) // - `invalid-argument`: The IP address in `remote-address` is set to INADDR_ANY (`0.0.0.0` / `::`). (EDESTADDRREQ, EADDRNOTAVAIL) // - `invalid-argument`: The port in `remote-address` is set to 0. (EDESTADDRREQ, EADDRNOTAVAIL) // - `invalid-argument`: The socket is in "connected" mode and `remote-address` is `some` value that does not match the address passed to `stream`. (EISCONN) @@ -1809,10 +1810,11 @@ extern bool udp_method_outgoing_datagram_stream_send(udp_borrow_outgoing_datagra // It's planned to be removed when `future` is natively supported in Preview3. extern udp_own_pollable_t udp_method_outgoing_datagram_stream_subscribe(udp_borrow_outgoing_datagram_stream_t self); -// Imported Functions from `wasi:sockets/udp-create-socket@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:sockets/udp-create-socket@0.2.0` // Create a new UDP socket. // // Similar to `socket(AF_INET or AF_INET6, SOCK_DGRAM, IPPROTO_UDP)` in POSIX. +// On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise. // // This function does not require a network capability handle. This is considered to be safe because // at time of creation, the socket is not bound to any `network` yet. Up to the moment `bind` is called, @@ -1831,31 +1833,40 @@ extern udp_own_pollable_t udp_method_outgoing_datagram_stream_subscribe(udp_borr // - extern bool udp_create_socket_create_udp_socket(udp_create_socket_ip_address_family_t address_family, udp_create_socket_own_udp_socket_t *ret, udp_create_socket_error_code_t *err); -// Imported Functions from `wasi:sockets/tcp@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:sockets/tcp@0.2.0` // Bind the socket to a specific network on the provided IP address and port. // // If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is left to the implementation to decide which // network interface(s) to bind to. // If the TCP/UDP port is zero, the socket will be bound to a random free port. // -// When a socket is not explicitly bound, the first invocation to a listen or connect operation will -// implicitly bind the socket. -// -// Unlike in POSIX, this function is async. This enables interactive WASI hosts to inject permission prompts. +// Bind can be attempted multiple times on the same socket, even with +// different arguments on each iteration. But never concurrently and +// only as long as the previous bind failed. Once a bind succeeds, the +// binding can't be changed anymore. // -// # Typical `start` errors +// # Typical errors // - `invalid-argument`: The `local-address` has the wrong address family. (EAFNOSUPPORT, EFAULT on Windows) // - `invalid-argument`: `local-address` is not a unicast address. (EINVAL) -// - `invalid-argument`: `local-address` is an IPv4-mapped IPv6 address, but the socket has `ipv6-only` enabled. (EINVAL) +// - `invalid-argument`: `local-address` is an IPv4-mapped IPv6 address. (EINVAL) // - `invalid-state`: The socket is already bound. (EINVAL) -// -// # Typical `finish` errors // - `address-in-use`: No ephemeral ports available. (EADDRINUSE, ENOBUFS on Windows) // - `address-in-use`: Address is already in use. (EADDRINUSE) // - `address-not-bindable`: `local-address` is not an address that the `network` can bind to. (EADDRNOTAVAIL) // - `not-in-progress`: A `bind` operation is not in progress. // - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN) // +// # Implementors note +// When binding to a non-zero port, this bind operation shouldn't be affected by the TIME_WAIT +// state of a recently closed socket on the same local address. In practice this means that the SO_REUSEADDR +// socket option should be set implicitly on all platforms, except on Windows where this is the default behavior +// and SO_REUSEADDR performs something different entirely. +// +// Unlike in POSIX, in WASI the bind operation is async. This enables +// interactive WASI hosts to inject permission prompts. Runtimes that +// don't want to make use of this ability can simply call the native +// `bind` as part of either `start-bind` or `finish-bind`. +// // # References // - // - @@ -1866,39 +1877,40 @@ extern bool tcp_method_tcp_socket_finish_bind(tcp_borrow_tcp_socket_t self, tcp_ // Connect to a remote endpoint. // // On success: -// - the socket is transitioned into the Connection 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 // -// POSIX mentions: -// > If connect() fails, the state of the socket is unspecified. Conforming applications should -// > close the file descriptor and create a new socket before attempting to reconnect. -// -// WASI prescribes the following behavior: -// - If `connect` fails because an input/state validation error, the socket should remain usable. -// - If a connection was actually attempted but failed, the socket should become unusable for further network communication. -// Besides `drop`, any method after such a failure may return an error. +// After a failed connection attempt, the socket will be in the `closed` +// state and the only valid action left is to `drop` the socket. A single +// socket can not be used to connect more than once. // -// # Typical `start` errors +// # Typical errors // - `invalid-argument`: The `remote-address` has the wrong address family. (EAFNOSUPPORT) // - `invalid-argument`: `remote-address` is not a unicast address. (EINVAL, ENETUNREACH on Linux, EAFNOSUPPORT on MacOS) -// - `invalid-argument`: `remote-address` is an IPv4-mapped IPv6 address, but the socket has `ipv6-only` enabled. (EINVAL, EADDRNOTAVAIL on Illumos) -// - `invalid-argument`: `remote-address` is a non-IPv4-mapped IPv6 address, but the socket was bound to a specific IPv4-mapped IPv6 address. (or vice versa) +// - `invalid-argument`: `remote-address` is an IPv4-mapped IPv6 address. (EINVAL, EADDRNOTAVAIL on Illumos) // - `invalid-argument`: The IP address in `remote-address` is set to INADDR_ANY (`0.0.0.0` / `::`). (EADDRNOTAVAIL on Windows) // - `invalid-argument`: The port in `remote-address` is set to 0. (EADDRNOTAVAIL on Windows) // - `invalid-argument`: The socket is already attached to a different network. The `network` passed to `connect` must be identical to the one passed to `bind`. -// - `invalid-state`: The socket is already in the Connection state. (EISCONN) -// - `invalid-state`: The socket is already in the Listener state. (EOPNOTSUPP, EINVAL on Windows) -// -// # Typical `finish` errors +// - `invalid-state`: The socket is already in the `connected` state. (EISCONN) +// - `invalid-state`: The socket is already in the `listening` state. (EOPNOTSUPP, EINVAL on Windows) // - `timeout`: Connection timed out. (ETIMEDOUT) // - `connection-refused`: The connection was forcefully rejected. (ECONNREFUSED) // - `connection-reset`: The connection was reset. (ECONNRESET) // - `connection-aborted`: The connection was aborted. (ECONNABORTED) // - `remote-unreachable`: The remote address is not reachable. (EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) // - `address-in-use`: Tried to perform an implicit bind, but there were no ephemeral ports available. (EADDRINUSE, EADDRNOTAVAIL on Linux, EAGAIN on BSD) -// - `not-in-progress`: A `connect` operation is not in progress. +// - `not-in-progress`: A connect operation is not in progress. // - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN) // +// # Implementors note +// The POSIX equivalent of `start-connect` is the regular `connect` syscall. +// Because all WASI sockets are non-blocking this is expected to return +// EINPROGRESS, which should be translated to `ok()` in WASI. +// +// The POSIX equivalent of `finish-connect` is a `poll` for event `POLLOUT` +// with a timeout of 0 on the socket descriptor. Followed by a check for +// the `SO_ERROR` socket option, in case the poll signaled readiness. +// // # References // - // - @@ -1908,22 +1920,24 @@ extern bool tcp_method_tcp_socket_start_connect(tcp_borrow_tcp_socket_t self, tc extern bool tcp_method_tcp_socket_finish_connect(tcp_borrow_tcp_socket_t self, tcp_tuple2_own_input_stream_own_output_stream_t *ret, tcp_error_code_t *err); // Start listening for new connections. // -// Transitions the socket into the Listener state. +// Transitions the socket into the `listening` state. // -// Unlike POSIX: -// - this function is async. This enables interactive WASI hosts to inject permission prompts. -// - the socket must already be explicitly bound. +// Unlike POSIX, the socket must already be explicitly bound. // -// # Typical `start` errors +// # Typical errors // - `invalid-state`: The socket is not bound to any local address. (EDESTADDRREQ) -// - `invalid-state`: The socket is already in the Connection state. (EISCONN, EINVAL on BSD) -// - `invalid-state`: The socket is already in the Listener state. -// -// # Typical `finish` errors +// - `invalid-state`: The socket is already in the `connected` state. (EISCONN, EINVAL on BSD) +// - `invalid-state`: The socket is already in the `listening` state. // - `address-in-use`: Tried to perform an implicit bind, but there were no ephemeral ports available. (EADDRINUSE) -// - `not-in-progress`: A `listen` operation is not in progress. +// - `not-in-progress`: A listen operation is not in progress. // - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN) // +// # Implementors note +// Unlike in POSIX, in WASI the listen operation is async. This enables +// interactive WASI hosts to inject permission prompts. Runtimes that +// don't want to make use of this ability can simply call the native +// `listen` as part of either `start-listen` or `finish-listen`. +// // # References // - // - @@ -1933,9 +1947,8 @@ extern bool tcp_method_tcp_socket_start_listen(tcp_borrow_tcp_socket_t self, tcp extern bool tcp_method_tcp_socket_finish_listen(tcp_borrow_tcp_socket_t self, tcp_error_code_t *err); // Accept a new client socket. // -// The returned socket is bound and in the Connection state. The following properties are inherited from the listener socket: +// The returned socket is bound and in the `connected` state. The following properties are inherited from the listener socket: // - `address-family` -// - `ipv6-only` // - `keep-alive-enabled` // - `keep-alive-idle-time` // - `keep-alive-interval` @@ -1948,7 +1961,7 @@ extern bool tcp_method_tcp_socket_finish_listen(tcp_borrow_tcp_socket_t self, tc // a pair of streams that can be used to read & write to the connection. // // # Typical errors -// - `invalid-state`: Socket is not in the Listener state. (EINVAL) +// - `invalid-state`: Socket is not in the `listening` state. (EINVAL) // - `would-block`: No pending connections at the moment. (EWOULDBLOCK, EAGAIN) // - `connection-aborted`: An incoming connection was pending, but was terminated by the client before this listener could accept it. (ECONNABORTED) // - `new-socket-limit`: The new socket resource could not be created because of a system limit. (EMFILE, ENFILE) @@ -1987,7 +2000,7 @@ extern bool tcp_method_tcp_socket_local_address(tcp_borrow_tcp_socket_t self, tc // - // - extern bool tcp_method_tcp_socket_remote_address(tcp_borrow_tcp_socket_t self, tcp_ip_socket_address_t *ret, tcp_error_code_t *err); -// Whether the socket is listening for new connections. +// Whether the socket is in the `listening` state. // // Equivalent to the SO_ACCEPTCONN socket option. extern bool tcp_method_tcp_socket_is_listening(tcp_borrow_tcp_socket_t self); @@ -1995,16 +2008,6 @@ extern bool tcp_method_tcp_socket_is_listening(tcp_borrow_tcp_socket_t self); // // Equivalent to the SO_DOMAIN socket option. extern tcp_ip_address_family_t tcp_method_tcp_socket_address_family(tcp_borrow_tcp_socket_t self); -// Whether IPv4 compatibility (dual-stack) mode is disabled or not. -// -// Equivalent to the IPV6_V6ONLY socket option. -// -// # Typical errors -// - `invalid-state`: (set) The socket is already bound. -// - `not-supported`: (get/set) `this` socket is an IPv4 socket. -// - `not-supported`: (set) Host does not support dual-stack sockets. (Implementations are not required to.) -extern bool tcp_method_tcp_socket_ipv6_only(tcp_borrow_tcp_socket_t self, bool *ret, tcp_error_code_t *err); -extern bool tcp_method_tcp_socket_set_ipv6_only(tcp_borrow_tcp_socket_t self, bool value, tcp_error_code_t *err); // Hints the desired listen queue size. Implementations are free to ignore this. // // If the provided value is 0, an `invalid-argument` error is returned. @@ -2013,7 +2016,7 @@ extern bool tcp_method_tcp_socket_set_ipv6_only(tcp_borrow_tcp_socket_t self, bo // # Typical errors // - `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 already in the Connection state. +// - `invalid-state`: (set) The socket is in the `connect-in-progress` or `connected` state. extern bool tcp_method_tcp_socket_set_listen_backlog_size(tcp_borrow_tcp_socket_t self, uint64_t value, tcp_error_code_t *err); // Enables or disables keepalive. // @@ -2068,8 +2071,6 @@ extern bool tcp_method_tcp_socket_set_keep_alive_count(tcp_borrow_tcp_socket_t s // // # Typical errors // - `invalid-argument`: (set) The TTL value must be 1 or higher. -// - `invalid-state`: (set) The socket is already in the Connection state. -// - `invalid-state`: (set) The socket is already in the Listener state. extern bool tcp_method_tcp_socket_hop_limit(tcp_borrow_tcp_socket_t self, uint8_t *ret, tcp_error_code_t *err); extern bool tcp_method_tcp_socket_set_hop_limit(tcp_borrow_tcp_socket_t self, uint8_t value, tcp_error_code_t *err); // The kernel buffer space reserved for sends/receives on this socket. @@ -2082,30 +2083,45 @@ extern bool tcp_method_tcp_socket_set_hop_limit(tcp_borrow_tcp_socket_t self, ui // // # Typical errors // - `invalid-argument`: (set) The provided value was 0. -// - `invalid-state`: (set) The socket is already in the Connection state. -// - `invalid-state`: (set) The socket is already in the Listener state. extern bool tcp_method_tcp_socket_receive_buffer_size(tcp_borrow_tcp_socket_t self, uint64_t *ret, tcp_error_code_t *err); extern bool tcp_method_tcp_socket_set_receive_buffer_size(tcp_borrow_tcp_socket_t self, uint64_t value, tcp_error_code_t *err); extern bool tcp_method_tcp_socket_send_buffer_size(tcp_borrow_tcp_socket_t self, uint64_t *ret, tcp_error_code_t *err); extern bool tcp_method_tcp_socket_set_send_buffer_size(tcp_borrow_tcp_socket_t self, uint64_t value, tcp_error_code_t *err); -// Create a `pollable` which will resolve once the socket is ready for I/O. +// Create a `pollable` which can be used to poll for, or block on, +// completion of any of the asynchronous operations of this socket. +// +// When `finish-bind`, `finish-listen`, `finish-connect` or `accept` +// return `error(would-block)`, this pollable can be used to wait for +// their success or failure, after which the method can be retried. +// +// The pollable is not limited to the async operation that happens to be +// in progress at the time of calling `subscribe` (if any). Theoretically, +// `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 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. extern tcp_own_pollable_t tcp_method_tcp_socket_subscribe(tcp_borrow_tcp_socket_t self); // Initiate a graceful shutdown. // -// - receive: the socket is not expecting to receive any more data from the peer. All subsequent read -// operations on the `input-stream` associated with this socket will return an End Of Stream indication. -// Any data still in the receive queue at time of calling `shutdown` will be discarded. -// - send: the socket is not expecting to send any more data to the peer. All subsequent write -// operations on the `output-stream` associated with this socket will return an error. -// - both: same effect as receive & send combined. +// - `receive`: The socket is not expecting to receive any data from +// the peer. The `input-stream` associated with this socket will be +// closed. Any data still in the receive queue at time of calling +// this method will be discarded. +// - `send`: The socket has no more data to send to the peer. The `output-stream` +// 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 a down a direction more than once +// has no effect and returns `ok`. // // The shutdown function does not close (drop) the socket. // // # Typical errors -// - `invalid-state`: The socket is not in the Connection state. (ENOTCONN) +// - `invalid-state`: The socket is not in the `connected` state. (ENOTCONN) // // # References // - @@ -2114,13 +2130,14 @@ extern tcp_own_pollable_t tcp_method_tcp_socket_subscribe(tcp_borrow_tcp_socket_ // - extern bool tcp_method_tcp_socket_shutdown(tcp_borrow_tcp_socket_t self, tcp_shutdown_type_t shutdown_type, tcp_error_code_t *err); -// Imported Functions from `wasi:sockets/tcp-create-socket@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:sockets/tcp-create-socket@0.2.0` // Create a new TCP socket. // // Similar to `socket(AF_INET or AF_INET6, SOCK_STREAM, IPPROTO_TCP)` in POSIX. +// On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise. // // This function does not require a network capability handle. This is considered to be safe because -// at time of creation, the socket is not bound to any `network` yet. Up to the moment `bind`/`listen`/`connect` +// at time of creation, the socket is not bound to any `network` yet. Up to the moment `bind`/`connect` // is called, the socket is effectively an in-memory configuration object, unable to communicate with the outside world. // // All sockets are non-blocking. Use the wasi-poll interface to block on asynchronous operations. @@ -2136,7 +2153,7 @@ extern bool tcp_method_tcp_socket_shutdown(tcp_borrow_tcp_socket_t self, tcp_shu // - extern bool tcp_create_socket_create_tcp_socket(tcp_create_socket_ip_address_family_t address_family, tcp_create_socket_own_tcp_socket_t *ret, tcp_create_socket_error_code_t *err); -// Imported Functions from `wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:sockets/ip-name-lookup@0.2.0` // Resolve an internet host name to a list of IP addresses. // // Unicode domain names are automatically converted to ASCII using IDNA encoding. @@ -2178,7 +2195,7 @@ extern bool ip_name_lookup_method_resolve_address_stream_resolve_next_address(ip // It's planned to be removed when `future` is natively supported in Preview3. extern ip_name_lookup_own_pollable_t ip_name_lookup_method_resolve_address_stream_subscribe(ip_name_lookup_borrow_resolve_address_stream_t self); -// Imported Functions from `wasi:random/random@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:random/random@0.2.0` // Return `len` cryptographically-secure random or pseudo-random bytes. // // This function must produce data at least as cryptographically secure and @@ -2198,7 +2215,7 @@ extern void random_get_random_bytes(uint64_t len, preview2_list_u8_t *ret); // represented as a `u64`. extern uint64_t random_get_random_u64(void); -// Imported Functions from `wasi:random/insecure@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:random/insecure@0.2.0` // Return `len` insecure pseudo-random bytes. // // This function is not cryptographically secure. Do not use it for @@ -2214,7 +2231,7 @@ extern void random_insecure_get_insecure_random_bytes(uint64_t len, preview2_lis // `get-insecure-random-bytes`, represented as a `u64`. extern uint64_t random_insecure_get_insecure_random_u64(void); -// Imported Functions from `wasi:random/insecure-seed@0.2.0-rc-2023-11-10` +// Imported Functions from `wasi:random/insecure-seed@0.2.0` // Return a 128-bit value that may contain a pseudo-random value. // // The returned value is not required to be computed from a CSPRNG, and may @@ -2398,8 +2415,6 @@ void udp_result_tuple2_own_incoming_datagram_stream_own_outgoing_datagram_stream void udp_result_ip_socket_address_error_code_free(udp_result_ip_socket_address_error_code_t *ptr); -void udp_result_bool_error_code_free(udp_result_bool_error_code_t *ptr); - void udp_result_u8_error_code_free(udp_result_u8_error_code_t *ptr); void udp_result_u64_error_code_free(udp_result_u64_error_code_t *ptr); diff --git a/libc-bottom-half/sources/preview2.c b/libc-bottom-half/sources/preview2.c index a5765c84..4d4c1bfd 100644 --- a/libc-bottom-half/sources/preview2.c +++ b/libc-bottom-half/sources/preview2.c @@ -1,383 +1,371 @@ -// Generated by `wit-bindgen` 0.16.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.17.0. DO NOT EDIT! #include "wasi/preview2.h" -__attribute__((__import_module__("wasi:cli/environment@0.2.0-rc-2023-12-05"), __import_name__("get-environment"))) +__attribute__((__import_module__("wasi:cli/environment@0.2.0"), __import_name__("get-environment"))) extern void __wasm_import_environment_get_environment(int32_t); -__attribute__((__import_module__("wasi:cli/environment@0.2.0-rc-2023-12-05"), __import_name__("get-arguments"))) +__attribute__((__import_module__("wasi:cli/environment@0.2.0"), __import_name__("get-arguments"))) extern void __wasm_import_environment_get_arguments(int32_t); -__attribute__((__import_module__("wasi:cli/environment@0.2.0-rc-2023-12-05"), __import_name__("initial-cwd"))) +__attribute__((__import_module__("wasi:cli/environment@0.2.0"), __import_name__("initial-cwd"))) extern void __wasm_import_environment_initial_cwd(int32_t); -__attribute__((__import_module__("wasi:cli/exit@0.2.0-rc-2023-12-05"), __import_name__("exit"))) +__attribute__((__import_module__("wasi:cli/exit@0.2.0"), __import_name__("exit"))) extern void __wasm_import_exit_exit(int32_t); -__attribute__((__import_module__("wasi:io/error@0.2.0-rc-2023-11-10"), __import_name__("[method]error.to-debug-string"))) +__attribute__((__import_module__("wasi:io/error@0.2.0"), __import_name__("[method]error.to-debug-string"))) extern void __wasm_import_io_error_method_error_to_debug_string(int32_t, int32_t); -__attribute__((__import_module__("wasi:io/poll@0.2.0-rc-2023-11-10"), __import_name__("[method]pollable.ready"))) +__attribute__((__import_module__("wasi:io/poll@0.2.0"), __import_name__("[method]pollable.ready"))) extern int32_t __wasm_import_poll_method_pollable_ready(int32_t); -__attribute__((__import_module__("wasi:io/poll@0.2.0-rc-2023-11-10"), __import_name__("[method]pollable.block"))) +__attribute__((__import_module__("wasi:io/poll@0.2.0"), __import_name__("[method]pollable.block"))) extern void __wasm_import_poll_method_pollable_block(int32_t); -__attribute__((__import_module__("wasi:io/poll@0.2.0-rc-2023-11-10"), __import_name__("poll"))) +__attribute__((__import_module__("wasi:io/poll@0.2.0"), __import_name__("poll"))) extern void __wasm_import_poll_poll(int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]input-stream.read"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]input-stream.read"))) extern void __wasm_import_streams_method_input_stream_read(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]input-stream.blocking-read"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]input-stream.blocking-read"))) extern void __wasm_import_streams_method_input_stream_blocking_read(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]input-stream.skip"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]input-stream.skip"))) extern void __wasm_import_streams_method_input_stream_skip(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]input-stream.blocking-skip"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]input-stream.blocking-skip"))) extern void __wasm_import_streams_method_input_stream_blocking_skip(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]input-stream.subscribe"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]input-stream.subscribe"))) extern int32_t __wasm_import_streams_method_input_stream_subscribe(int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.check-write"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.check-write"))) extern void __wasm_import_streams_method_output_stream_check_write(int32_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.write"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.write"))) extern void __wasm_import_streams_method_output_stream_write(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.blocking-write-and-flush"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.blocking-write-and-flush"))) extern void __wasm_import_streams_method_output_stream_blocking_write_and_flush(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.flush"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.flush"))) extern void __wasm_import_streams_method_output_stream_flush(int32_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.blocking-flush"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.blocking-flush"))) extern void __wasm_import_streams_method_output_stream_blocking_flush(int32_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.subscribe"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.subscribe"))) extern int32_t __wasm_import_streams_method_output_stream_subscribe(int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.write-zeroes"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.write-zeroes"))) extern void __wasm_import_streams_method_output_stream_write_zeroes(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.blocking-write-zeroes-and-flush"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.blocking-write-zeroes-and-flush"))) extern void __wasm_import_streams_method_output_stream_blocking_write_zeroes_and_flush(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.splice"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.splice"))) extern void __wasm_import_streams_method_output_stream_splice(int32_t, int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[method]output-stream.blocking-splice"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[method]output-stream.blocking-splice"))) extern void __wasm_import_streams_method_output_stream_blocking_splice(int32_t, int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:cli/stdin@0.2.0-rc-2023-12-05"), __import_name__("get-stdin"))) +__attribute__((__import_module__("wasi:cli/stdin@0.2.0"), __import_name__("get-stdin"))) extern int32_t __wasm_import_stdin_get_stdin(void); -__attribute__((__import_module__("wasi:cli/stdout@0.2.0-rc-2023-12-05"), __import_name__("get-stdout"))) +__attribute__((__import_module__("wasi:cli/stdout@0.2.0"), __import_name__("get-stdout"))) extern int32_t __wasm_import_stdout_get_stdout(void); -__attribute__((__import_module__("wasi:cli/stderr@0.2.0-rc-2023-12-05"), __import_name__("get-stderr"))) +__attribute__((__import_module__("wasi:cli/stderr@0.2.0"), __import_name__("get-stderr"))) extern int32_t __wasm_import_stderr_get_stderr(void); -__attribute__((__import_module__("wasi:cli/terminal-stdin@0.2.0-rc-2023-12-05"), __import_name__("get-terminal-stdin"))) +__attribute__((__import_module__("wasi:cli/terminal-stdin@0.2.0"), __import_name__("get-terminal-stdin"))) extern void __wasm_import_terminal_stdin_get_terminal_stdin(int32_t); -__attribute__((__import_module__("wasi:cli/terminal-stdout@0.2.0-rc-2023-12-05"), __import_name__("get-terminal-stdout"))) +__attribute__((__import_module__("wasi:cli/terminal-stdout@0.2.0"), __import_name__("get-terminal-stdout"))) extern void __wasm_import_terminal_stdout_get_terminal_stdout(int32_t); -__attribute__((__import_module__("wasi:cli/terminal-stderr@0.2.0-rc-2023-12-05"), __import_name__("get-terminal-stderr"))) +__attribute__((__import_module__("wasi:cli/terminal-stderr@0.2.0"), __import_name__("get-terminal-stderr"))) extern void __wasm_import_terminal_stderr_get_terminal_stderr(int32_t); -__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10"), __import_name__("now"))) +__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0"), __import_name__("now"))) extern int64_t __wasm_import_monotonic_clock_now(void); -__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10"), __import_name__("resolution"))) +__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0"), __import_name__("resolution"))) extern int64_t __wasm_import_monotonic_clock_resolution(void); -__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10"), __import_name__("subscribe-instant"))) +__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0"), __import_name__("subscribe-instant"))) extern int32_t __wasm_import_monotonic_clock_subscribe_instant(int64_t); -__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10"), __import_name__("subscribe-duration"))) +__attribute__((__import_module__("wasi:clocks/monotonic-clock@0.2.0"), __import_name__("subscribe-duration"))) extern int32_t __wasm_import_monotonic_clock_subscribe_duration(int64_t); -__attribute__((__import_module__("wasi:clocks/wall-clock@0.2.0-rc-2023-11-10"), __import_name__("now"))) +__attribute__((__import_module__("wasi:clocks/wall-clock@0.2.0"), __import_name__("now"))) extern void __wasm_import_wall_clock_now(int32_t); -__attribute__((__import_module__("wasi:clocks/wall-clock@0.2.0-rc-2023-11-10"), __import_name__("resolution"))) +__attribute__((__import_module__("wasi:clocks/wall-clock@0.2.0"), __import_name__("resolution"))) extern void __wasm_import_wall_clock_resolution(int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.read-via-stream"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.read-via-stream"))) extern void __wasm_import_filesystem_method_descriptor_read_via_stream(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.write-via-stream"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.write-via-stream"))) extern void __wasm_import_filesystem_method_descriptor_write_via_stream(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.append-via-stream"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.append-via-stream"))) extern void __wasm_import_filesystem_method_descriptor_append_via_stream(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.advise"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.advise"))) extern void __wasm_import_filesystem_method_descriptor_advise(int32_t, int64_t, int64_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.sync-data"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.sync-data"))) extern void __wasm_import_filesystem_method_descriptor_sync_data(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.get-flags"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.get-flags"))) extern void __wasm_import_filesystem_method_descriptor_get_flags(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.get-type"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.get-type"))) extern void __wasm_import_filesystem_method_descriptor_get_type(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.set-size"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.set-size"))) extern void __wasm_import_filesystem_method_descriptor_set_size(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.set-times"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.set-times"))) extern void __wasm_import_filesystem_method_descriptor_set_times(int32_t, int32_t, int64_t, int32_t, int32_t, int64_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.read"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.read"))) extern void __wasm_import_filesystem_method_descriptor_read(int32_t, int64_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.write"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.write"))) extern void __wasm_import_filesystem_method_descriptor_write(int32_t, int32_t, int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.read-directory"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.read-directory"))) extern void __wasm_import_filesystem_method_descriptor_read_directory(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.sync"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.sync"))) extern void __wasm_import_filesystem_method_descriptor_sync(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.create-directory-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.create-directory-at"))) extern void __wasm_import_filesystem_method_descriptor_create_directory_at(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.stat"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.stat"))) extern void __wasm_import_filesystem_method_descriptor_stat(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.stat-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.stat-at"))) extern void __wasm_import_filesystem_method_descriptor_stat_at(int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.set-times-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.set-times-at"))) extern void __wasm_import_filesystem_method_descriptor_set_times_at(int32_t, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t, int32_t, int64_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.link-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.link-at"))) extern void __wasm_import_filesystem_method_descriptor_link_at(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.open-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.open-at"))) extern void __wasm_import_filesystem_method_descriptor_open_at(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.readlink-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.readlink-at"))) extern void __wasm_import_filesystem_method_descriptor_readlink_at(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.remove-directory-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.remove-directory-at"))) extern void __wasm_import_filesystem_method_descriptor_remove_directory_at(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.rename-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.rename-at"))) extern void __wasm_import_filesystem_method_descriptor_rename_at(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.symlink-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.symlink-at"))) extern void __wasm_import_filesystem_method_descriptor_symlink_at(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.unlink-file-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.unlink-file-at"))) extern void __wasm_import_filesystem_method_descriptor_unlink_file_at(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.is-same-object"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.is-same-object"))) extern int32_t __wasm_import_filesystem_method_descriptor_is_same_object(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.metadata-hash"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.metadata-hash"))) extern void __wasm_import_filesystem_method_descriptor_metadata_hash(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]descriptor.metadata-hash-at"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]descriptor.metadata-hash-at"))) extern void __wasm_import_filesystem_method_descriptor_metadata_hash_at(int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[method]directory-entry-stream.read-directory-entry"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[method]directory-entry-stream.read-directory-entry"))) extern void __wasm_import_filesystem_method_directory_entry_stream_read_directory_entry(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("filesystem-error-code"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("filesystem-error-code"))) extern void __wasm_import_filesystem_filesystem_error_code(int32_t, int32_t); -__attribute__((__import_module__("wasi:filesystem/preopens@0.2.0-rc-2023-11-10"), __import_name__("get-directories"))) +__attribute__((__import_module__("wasi:filesystem/preopens@0.2.0"), __import_name__("get-directories"))) extern void __wasm_import_filesystem_preopens_get_directories(int32_t); -__attribute__((__import_module__("wasi:sockets/instance-network@0.2.0-rc-2023-11-10"), __import_name__("instance-network"))) +__attribute__((__import_module__("wasi:sockets/instance-network@0.2.0"), __import_name__("instance-network"))) extern int32_t __wasm_import_instance_network_instance_network(void); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.start-bind"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.start-bind"))) extern void __wasm_import_udp_method_udp_socket_start_bind(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.finish-bind"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.finish-bind"))) extern void __wasm_import_udp_method_udp_socket_finish_bind(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.stream"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.stream"))) extern void __wasm_import_udp_method_udp_socket_stream(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.local-address"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.local-address"))) extern void __wasm_import_udp_method_udp_socket_local_address(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.remote-address"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.remote-address"))) extern void __wasm_import_udp_method_udp_socket_remote_address(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.address-family"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.address-family"))) extern int32_t __wasm_import_udp_method_udp_socket_address_family(int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.ipv6-only"))) -extern void __wasm_import_udp_method_udp_socket_ipv6_only(int32_t, int32_t); - -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.set-ipv6-only"))) -extern void __wasm_import_udp_method_udp_socket_set_ipv6_only(int32_t, int32_t, int32_t); - -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.unicast-hop-limit"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.unicast-hop-limit"))) extern void __wasm_import_udp_method_udp_socket_unicast_hop_limit(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.set-unicast-hop-limit"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.set-unicast-hop-limit"))) extern void __wasm_import_udp_method_udp_socket_set_unicast_hop_limit(int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.receive-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.receive-buffer-size"))) extern void __wasm_import_udp_method_udp_socket_receive_buffer_size(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.set-receive-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.set-receive-buffer-size"))) extern void __wasm_import_udp_method_udp_socket_set_receive_buffer_size(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.send-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.send-buffer-size"))) extern void __wasm_import_udp_method_udp_socket_send_buffer_size(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.set-send-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.set-send-buffer-size"))) extern void __wasm_import_udp_method_udp_socket_set_send_buffer_size(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]udp-socket.subscribe"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]udp-socket.subscribe"))) extern int32_t __wasm_import_udp_method_udp_socket_subscribe(int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]incoming-datagram-stream.receive"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]incoming-datagram-stream.receive"))) extern void __wasm_import_udp_method_incoming_datagram_stream_receive(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]incoming-datagram-stream.subscribe"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]incoming-datagram-stream.subscribe"))) extern int32_t __wasm_import_udp_method_incoming_datagram_stream_subscribe(int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]outgoing-datagram-stream.check-send"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]outgoing-datagram-stream.check-send"))) extern void __wasm_import_udp_method_outgoing_datagram_stream_check_send(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]outgoing-datagram-stream.send"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]outgoing-datagram-stream.send"))) extern void __wasm_import_udp_method_outgoing_datagram_stream_send(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[method]outgoing-datagram-stream.subscribe"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[method]outgoing-datagram-stream.subscribe"))) extern int32_t __wasm_import_udp_method_outgoing_datagram_stream_subscribe(int32_t); -__attribute__((__import_module__("wasi:sockets/udp-create-socket@0.2.0-rc-2023-11-10"), __import_name__("create-udp-socket"))) +__attribute__((__import_module__("wasi:sockets/udp-create-socket@0.2.0"), __import_name__("create-udp-socket"))) extern void __wasm_import_udp_create_socket_create_udp_socket(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.start-bind"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.start-bind"))) extern void __wasm_import_tcp_method_tcp_socket_start_bind(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.finish-bind"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.finish-bind"))) extern void __wasm_import_tcp_method_tcp_socket_finish_bind(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.start-connect"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.start-connect"))) extern void __wasm_import_tcp_method_tcp_socket_start_connect(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.finish-connect"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.finish-connect"))) extern void __wasm_import_tcp_method_tcp_socket_finish_connect(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.start-listen"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.start-listen"))) extern void __wasm_import_tcp_method_tcp_socket_start_listen(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.finish-listen"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.finish-listen"))) extern void __wasm_import_tcp_method_tcp_socket_finish_listen(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.accept"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.accept"))) extern void __wasm_import_tcp_method_tcp_socket_accept(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.local-address"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.local-address"))) extern void __wasm_import_tcp_method_tcp_socket_local_address(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.remote-address"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.remote-address"))) extern void __wasm_import_tcp_method_tcp_socket_remote_address(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.is-listening"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.is-listening"))) extern int32_t __wasm_import_tcp_method_tcp_socket_is_listening(int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.address-family"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.address-family"))) extern int32_t __wasm_import_tcp_method_tcp_socket_address_family(int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.ipv6-only"))) -extern void __wasm_import_tcp_method_tcp_socket_ipv6_only(int32_t, int32_t); - -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-ipv6-only"))) -extern void __wasm_import_tcp_method_tcp_socket_set_ipv6_only(int32_t, int32_t, int32_t); - -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-listen-backlog-size"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-listen-backlog-size"))) extern void __wasm_import_tcp_method_tcp_socket_set_listen_backlog_size(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.keep-alive-enabled"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.keep-alive-enabled"))) extern void __wasm_import_tcp_method_tcp_socket_keep_alive_enabled(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-keep-alive-enabled"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-keep-alive-enabled"))) extern void __wasm_import_tcp_method_tcp_socket_set_keep_alive_enabled(int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.keep-alive-idle-time"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.keep-alive-idle-time"))) extern void __wasm_import_tcp_method_tcp_socket_keep_alive_idle_time(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-keep-alive-idle-time"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-keep-alive-idle-time"))) extern void __wasm_import_tcp_method_tcp_socket_set_keep_alive_idle_time(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.keep-alive-interval"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.keep-alive-interval"))) extern void __wasm_import_tcp_method_tcp_socket_keep_alive_interval(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-keep-alive-interval"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-keep-alive-interval"))) extern void __wasm_import_tcp_method_tcp_socket_set_keep_alive_interval(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.keep-alive-count"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.keep-alive-count"))) extern void __wasm_import_tcp_method_tcp_socket_keep_alive_count(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-keep-alive-count"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-keep-alive-count"))) extern void __wasm_import_tcp_method_tcp_socket_set_keep_alive_count(int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.hop-limit"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.hop-limit"))) extern void __wasm_import_tcp_method_tcp_socket_hop_limit(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-hop-limit"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-hop-limit"))) extern void __wasm_import_tcp_method_tcp_socket_set_hop_limit(int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.receive-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.receive-buffer-size"))) extern void __wasm_import_tcp_method_tcp_socket_receive_buffer_size(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-receive-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-receive-buffer-size"))) extern void __wasm_import_tcp_method_tcp_socket_set_receive_buffer_size(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.send-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.send-buffer-size"))) extern void __wasm_import_tcp_method_tcp_socket_send_buffer_size(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.set-send-buffer-size"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.set-send-buffer-size"))) extern void __wasm_import_tcp_method_tcp_socket_set_send_buffer_size(int32_t, int64_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.subscribe"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.subscribe"))) extern int32_t __wasm_import_tcp_method_tcp_socket_subscribe(int32_t); -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[method]tcp-socket.shutdown"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[method]tcp-socket.shutdown"))) extern void __wasm_import_tcp_method_tcp_socket_shutdown(int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/tcp-create-socket@0.2.0-rc-2023-11-10"), __import_name__("create-tcp-socket"))) +__attribute__((__import_module__("wasi:sockets/tcp-create-socket@0.2.0"), __import_name__("create-tcp-socket"))) extern void __wasm_import_tcp_create_socket_create_tcp_socket(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10"), __import_name__("resolve-addresses"))) +__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0"), __import_name__("resolve-addresses"))) extern void __wasm_import_ip_name_lookup_resolve_addresses(int32_t, int32_t, int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10"), __import_name__("[method]resolve-address-stream.resolve-next-address"))) +__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0"), __import_name__("[method]resolve-address-stream.resolve-next-address"))) extern void __wasm_import_ip_name_lookup_method_resolve_address_stream_resolve_next_address(int32_t, int32_t); -__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10"), __import_name__("[method]resolve-address-stream.subscribe"))) +__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0"), __import_name__("[method]resolve-address-stream.subscribe"))) extern int32_t __wasm_import_ip_name_lookup_method_resolve_address_stream_subscribe(int32_t); -__attribute__((__import_module__("wasi:random/random@0.2.0-rc-2023-11-10"), __import_name__("get-random-bytes"))) +__attribute__((__import_module__("wasi:random/random@0.2.0"), __import_name__("get-random-bytes"))) extern void __wasm_import_random_get_random_bytes(int64_t, int32_t); -__attribute__((__import_module__("wasi:random/random@0.2.0-rc-2023-11-10"), __import_name__("get-random-u64"))) +__attribute__((__import_module__("wasi:random/random@0.2.0"), __import_name__("get-random-u64"))) extern int64_t __wasm_import_random_get_random_u64(void); -__attribute__((__import_module__("wasi:random/insecure@0.2.0-rc-2023-11-10"), __import_name__("get-insecure-random-bytes"))) +__attribute__((__import_module__("wasi:random/insecure@0.2.0"), __import_name__("get-insecure-random-bytes"))) extern void __wasm_import_random_insecure_get_insecure_random_bytes(int64_t, int32_t); -__attribute__((__import_module__("wasi:random/insecure@0.2.0-rc-2023-11-10"), __import_name__("get-insecure-random-u64"))) +__attribute__((__import_module__("wasi:random/insecure@0.2.0"), __import_name__("get-insecure-random-u64"))) extern int64_t __wasm_import_random_insecure_get_insecure_random_u64(void); -__attribute__((__import_module__("wasi:random/insecure-seed@0.2.0-rc-2023-11-10"), __import_name__("insecure-seed"))) +__attribute__((__import_module__("wasi:random/insecure-seed@0.2.0"), __import_name__("insecure-seed"))) extern void __wasm_import_random_insecure_seed_insecure_seed(int32_t); __attribute__((__weak__, __export_name__("cabi_realloc"))) @@ -425,7 +413,7 @@ void exit_result_void_void_free(exit_result_void_void_t *ptr) { } } -__attribute__((__import_module__("wasi:io/error@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]error"))) +__attribute__((__import_module__("wasi:io/error@0.2.0"), __import_name__("[resource-drop]error"))) extern void __wasm_import_io_error_error_drop(int32_t handle); void io_error_error_drop_own(io_error_own_error_t handle) { @@ -440,7 +428,7 @@ io_error_borrow_error_t io_error_borrow_error(io_error_own_error_t arg) { return (io_error_borrow_error_t) { arg.__handle }; } -__attribute__((__import_module__("wasi:io/poll@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]pollable"))) +__attribute__((__import_module__("wasi:io/poll@0.2.0"), __import_name__("[resource-drop]pollable"))) extern void __wasm_import_poll_pollable_drop(int32_t handle); void poll_pollable_drop_own(poll_own_pollable_t handle) { @@ -479,7 +467,7 @@ void streams_stream_error_free(streams_stream_error_t *ptr) { } } -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]input-stream"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[resource-drop]input-stream"))) extern void __wasm_import_streams_input_stream_drop(int32_t handle); void streams_input_stream_drop_own(streams_own_input_stream_t handle) { @@ -494,7 +482,7 @@ streams_borrow_input_stream_t streams_borrow_input_stream(streams_own_input_stre return (streams_borrow_input_stream_t) { arg.__handle }; } -__attribute__((__import_module__("wasi:io/streams@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]output-stream"))) +__attribute__((__import_module__("wasi:io/streams@0.2.0"), __import_name__("[resource-drop]output-stream"))) extern void __wasm_import_streams_output_stream_drop(int32_t handle); void streams_output_stream_drop_own(streams_own_output_stream_t handle) { @@ -539,7 +527,7 @@ void streams_result_void_stream_error_free(streams_result_void_stream_error_t *p } } -__attribute__((__import_module__("wasi:cli/terminal-input@0.2.0-rc-2023-12-05"), __import_name__("[resource-drop]terminal-input"))) +__attribute__((__import_module__("wasi:cli/terminal-input@0.2.0"), __import_name__("[resource-drop]terminal-input"))) extern void __wasm_import_terminal_input_terminal_input_drop(int32_t handle); void terminal_input_terminal_input_drop_own(terminal_input_own_terminal_input_t handle) { @@ -554,7 +542,7 @@ terminal_input_borrow_terminal_input_t terminal_input_borrow_terminal_input(term return (terminal_input_borrow_terminal_input_t) { arg.__handle }; } -__attribute__((__import_module__("wasi:cli/terminal-output@0.2.0-rc-2023-12-05"), __import_name__("[resource-drop]terminal-output"))) +__attribute__((__import_module__("wasi:cli/terminal-output@0.2.0"), __import_name__("[resource-drop]terminal-output"))) extern void __wasm_import_terminal_output_terminal_output_drop(int32_t handle); void terminal_output_terminal_output_drop_own(terminal_output_own_terminal_output_t handle) { @@ -607,7 +595,7 @@ void filesystem_directory_entry_free(filesystem_directory_entry_t *ptr) { preview2_string_free(&ptr->name); } -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]descriptor"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[resource-drop]descriptor"))) extern void __wasm_import_filesystem_descriptor_drop(int32_t handle); void filesystem_descriptor_drop_own(filesystem_own_descriptor_t handle) { @@ -622,7 +610,7 @@ filesystem_borrow_descriptor_t filesystem_borrow_descriptor(filesystem_own_descr return (filesystem_borrow_descriptor_t) { arg.__handle }; } -__attribute__((__import_module__("wasi:filesystem/types@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]directory-entry-stream"))) +__attribute__((__import_module__("wasi:filesystem/types@0.2.0"), __import_name__("[resource-drop]directory-entry-stream"))) extern void __wasm_import_filesystem_directory_entry_stream_drop(int32_t handle); void filesystem_directory_entry_stream_drop_own(filesystem_own_directory_entry_stream_t handle) { @@ -742,7 +730,7 @@ void filesystem_preopens_list_tuple2_own_descriptor_string_free(filesystem_preop } } -__attribute__((__import_module__("wasi:sockets/network@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]network"))) +__attribute__((__import_module__("wasi:sockets/network@0.2.0"), __import_name__("[resource-drop]network"))) extern void __wasm_import_network_network_drop(int32_t handle); void network_network_drop_own(network_own_network_t handle) { @@ -797,7 +785,7 @@ void udp_outgoing_datagram_free(udp_outgoing_datagram_t *ptr) { udp_option_ip_socket_address_free(&ptr->remote_address); } -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]udp-socket"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[resource-drop]udp-socket"))) extern void __wasm_import_udp_udp_socket_drop(int32_t handle); void udp_udp_socket_drop_own(udp_own_udp_socket_t handle) { @@ -812,7 +800,7 @@ udp_borrow_udp_socket_t udp_borrow_udp_socket(udp_own_udp_socket_t arg) { return (udp_borrow_udp_socket_t) { arg.__handle }; } -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]incoming-datagram-stream"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[resource-drop]incoming-datagram-stream"))) extern void __wasm_import_udp_incoming_datagram_stream_drop(int32_t handle); void udp_incoming_datagram_stream_drop_own(udp_own_incoming_datagram_stream_t handle) { @@ -827,7 +815,7 @@ udp_borrow_incoming_datagram_stream_t udp_borrow_incoming_datagram_stream(udp_ow return (udp_borrow_incoming_datagram_stream_t) { arg.__handle }; } -__attribute__((__import_module__("wasi:sockets/udp@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]outgoing-datagram-stream"))) +__attribute__((__import_module__("wasi:sockets/udp@0.2.0"), __import_name__("[resource-drop]outgoing-datagram-stream"))) extern void __wasm_import_udp_outgoing_datagram_stream_drop(int32_t handle); void udp_outgoing_datagram_stream_drop_own(udp_own_outgoing_datagram_stream_t handle) { @@ -861,12 +849,6 @@ void udp_result_ip_socket_address_error_code_free(udp_result_ip_socket_address_e } } -void udp_result_bool_error_code_free(udp_result_bool_error_code_t *ptr) { - if (!ptr->is_err) { - } else { - } -} - void udp_result_u8_error_code_free(udp_result_u8_error_code_t *ptr) { if (!ptr->is_err) { } else { @@ -914,7 +896,7 @@ void tcp_ip_socket_address_free(tcp_ip_socket_address_t *ptr) { network_ip_socket_address_free(ptr); } -__attribute__((__import_module__("wasi:sockets/tcp@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]tcp-socket"))) +__attribute__((__import_module__("wasi:sockets/tcp@0.2.0"), __import_name__("[resource-drop]tcp-socket"))) extern void __wasm_import_tcp_tcp_socket_drop(int32_t handle); void tcp_tcp_socket_drop_own(tcp_own_tcp_socket_t handle) { @@ -994,7 +976,7 @@ void ip_name_lookup_ip_address_free(ip_name_lookup_ip_address_t *ptr) { network_ip_address_free(ptr); } -__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10"), __import_name__("[resource-drop]resolve-address-stream"))) +__attribute__((__import_module__("wasi:sockets/ip-name-lookup@0.2.0"), __import_name__("[resource-drop]resolve-address-stream"))) extern void __wasm_import_ip_name_lookup_resolve_address_stream_drop(int32_t handle); void ip_name_lookup_resolve_address_stream_drop_own(ip_name_lookup_own_resolve_address_stream_t handle) { @@ -3065,58 +3047,6 @@ udp_ip_address_family_t udp_method_udp_socket_address_family(udp_borrow_udp_sock return ret; } -bool udp_method_udp_socket_ipv6_only(udp_borrow_udp_socket_t self, bool *ret, udp_error_code_t *err) { - __attribute__((__aligned__(1))) - uint8_t ret_area[2]; - int32_t ptr = (int32_t) &ret_area; - __wasm_import_udp_method_udp_socket_ipv6_only((self).__handle, ptr); - udp_result_bool_error_code_t result; - switch ((int32_t) (*((uint8_t*) (ptr + 0)))) { - case 0: { - result.is_err = false; - result.val.ok = (int32_t) (*((uint8_t*) (ptr + 1))); - break; - } - case 1: { - result.is_err = true; - result.val.err = (int32_t) (*((uint8_t*) (ptr + 1))); - break; - } - } - if (!result.is_err) { - *ret = result.val.ok; - return 1; - } else { - *err = result.val.err; - return 0; - } -} - -bool udp_method_udp_socket_set_ipv6_only(udp_borrow_udp_socket_t self, bool value, udp_error_code_t *err) { - __attribute__((__aligned__(1))) - uint8_t ret_area[2]; - int32_t ptr = (int32_t) &ret_area; - __wasm_import_udp_method_udp_socket_set_ipv6_only((self).__handle, value, ptr); - udp_result_void_error_code_t result; - switch ((int32_t) (*((uint8_t*) (ptr + 0)))) { - case 0: { - result.is_err = false; - break; - } - case 1: { - result.is_err = true; - result.val.err = (int32_t) (*((uint8_t*) (ptr + 1))); - break; - } - } - if (!result.is_err) { - return 1; - } else { - *err = result.val.err; - return 0; - } -} - bool udp_method_udp_socket_unicast_hop_limit(udp_borrow_udp_socket_t self, uint8_t *ret, udp_error_code_t *err) { __attribute__((__aligned__(1))) uint8_t ret_area[2]; @@ -3808,58 +3738,6 @@ tcp_ip_address_family_t tcp_method_tcp_socket_address_family(tcp_borrow_tcp_sock return ret; } -bool tcp_method_tcp_socket_ipv6_only(tcp_borrow_tcp_socket_t self, bool *ret, tcp_error_code_t *err) { - __attribute__((__aligned__(1))) - uint8_t ret_area[2]; - int32_t ptr = (int32_t) &ret_area; - __wasm_import_tcp_method_tcp_socket_ipv6_only((self).__handle, ptr); - tcp_result_bool_error_code_t result; - switch ((int32_t) (*((uint8_t*) (ptr + 0)))) { - case 0: { - result.is_err = false; - result.val.ok = (int32_t) (*((uint8_t*) (ptr + 1))); - break; - } - case 1: { - result.is_err = true; - result.val.err = (int32_t) (*((uint8_t*) (ptr + 1))); - break; - } - } - if (!result.is_err) { - *ret = result.val.ok; - return 1; - } else { - *err = result.val.err; - return 0; - } -} - -bool tcp_method_tcp_socket_set_ipv6_only(tcp_borrow_tcp_socket_t self, bool value, tcp_error_code_t *err) { - __attribute__((__aligned__(1))) - uint8_t ret_area[2]; - int32_t ptr = (int32_t) &ret_area; - __wasm_import_tcp_method_tcp_socket_set_ipv6_only((self).__handle, value, ptr); - tcp_result_void_error_code_t result; - switch ((int32_t) (*((uint8_t*) (ptr + 0)))) { - case 0: { - result.is_err = false; - break; - } - case 1: { - result.is_err = true; - result.val.err = (int32_t) (*((uint8_t*) (ptr + 1))); - break; - } - } - if (!result.is_err) { - return 1; - } else { - *err = result.val.err; - return 0; - } -} - bool tcp_method_tcp_socket_set_listen_backlog_size(tcp_borrow_tcp_socket_t self, uint64_t value, tcp_error_code_t *err) { __attribute__((__aligned__(1))) uint8_t ret_area[2]; diff --git a/libc-bottom-half/sources/preview2_component_type.o b/libc-bottom-half/sources/preview2_component_type.o index 63861623ed3734f1b34156228adb6114e4dfb276..eef1630d5931fe3e137f8a8bd1ac28e11de0916c 100644 GIT binary patch delta 941 zcmY*Y&1=(O9L_Ioy0+^!Y}am0m$Y5Kzq?(A6W47Fzd#hN-~(H*&uV-c2o79ndTN!K;KC%|2} z=k@jk1aE4J(u2EsddKGX4{*cOC81$hicicL|M+2qVT!V9W#dW5xk*cN(2X!!s~^v} z@uH)^kzBCZ;J+Dy_2qvZEO5vUaZ`*3mcdSqnUda+RY55bqh`yrfem;RhIo83bdBc@ zI~8Of7}CA8^l(Gy6m-dGDW=h;viOJ3dvb#=X)1}OaB(aT8{Pp{pkkK%oc2m(=8-9pa{7JHpZ5ST7`>51G>`u&wzZ1i}qzW}f5+OZk z=wr47r6p}semj-Ho#eD@Fp}xsNW^GJ;)B#xa{Zjzga9t216WJHB0ZQ)ygQd!1acmo zY!u&SmnJ8By>&qqwMNOhScNxHUTQ&5=x-8ZcGBr7;dwsK_j#S) z;}c(ha(glK>zVE4W1*eX+uCQ6xT!k&p@yMXh}qF?%WM+Utt;hPS&{9ATvKZMIXIf>W4cu#wr$y?VpX|{=iq8O-4ml!%QB1rsQWkE2P68QPplHiM=EsUo0rh#9L zEx{`OFvg$q=j5hg9atvn61%CJsv*;qt+pG6Fs!|v-iR|W0gRud36w}2jq%86WA6AF zSo55T|LF*yj=$R@Rz^cVirj$;{uRm03=8*G5}o)EO8DtS(r@o}Cg!I>!Y|{?eg}RR z|Cna@C%)phcVi3RhCsyodzbtUe7N@=sN(EmZp5xE*5QNh#^ROG>=tlP2i76Rxfqki zBm6>IZ*>mHmT6pp4Aet?7uQjZHrZn0EQRhT6R9DTg^O@)w@Qv>1j@v4HaQ0ZW|D8u ze6BfF6@EUG!_SH^*vRBCbXr%Xr|>S9=-x{$hhrCE3#JBnV_rc?e4LK) z!z~mCmB(JM3V+Hh;O#s+HKas3a2^i{QGAx2XKDF)PX>R?P2pR)h&OzxXP{B|XU{m< zy_w5~=s8-#0zSwervF~%FA4rm-9})i*9$vu)O;gx8@Q2*`>(P4Uhyc<59F3O`hk2e zt``cucw03!t6Ay)1Pv9W6Jq~ieTC|#LmF+H1i_XhoR)X%4q(|KL<@*exK;Mma=m9w qZ?-Jk{m;YLd!-&phZEI$@ +else +%.wasm.err: %.core.wasm $(ENGINE) $< >$@ +endif clean:: rm -rf $(OBJDIR)/*/*.err