From 1aff36cabec03117803ba70b3515e249c31b84c8 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Tue, 3 Dec 2024 12:54:47 +0100 Subject: [PATCH] More wasm32-wasi + p1 --- Makefile | 2 +- examples/tcp_listenfd_server.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 85de1ee74..a104bcda1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Targets available via Rustup that are supported. -TARGETS ?= aarch64-apple-darwin aarch64-apple-ios aarch64-linux-android arm-linux-androideabi i686-unknown-linux-gnu wasm32-wasi x86_64-apple-darwin x86_64-apple-ios x86_64-pc-windows-gnu x86_64-pc-windows-msvc x86_64-unknown-freebsd x86_64-unknown-illumos x86_64-unknown-linux-gnu x86_64-unknown-linux-musl x86_64-unknown-netbsd x86_64-unknown-redox +TARGETS ?= x86_64-pc-windows-msvc x86_64-unknown-freebsd x86_64-unknown-illumos x86_64-unknown-linux-gnu x86_64-unknown-linux-musl x86_64-unknown-netbsd x86_64-unknown-redox # Example value: `nightly-x86_64-apple-darwin`. RUSTUP_TOOLCHAIN ?= $(shell rustup show active-toolchain | cut -d' ' -f1) # Architecture target. Example value: `x86_64-apple-darwin`. diff --git a/examples/tcp_listenfd_server.rs b/examples/tcp_listenfd_server.rs index edd85e277..781f046ba 100644 --- a/examples/tcp_listenfd_server.rs +++ b/examples/tcp_listenfd_server.rs @@ -1,8 +1,8 @@ // You can run this example from the root of the mio repo: // cargo run --example tcp_listenfd_server --features="os-poll net" // or with wasi: -// cargo +nightly build --target wasm32-wasi --example tcp_listenfd_server --features="os-poll net" -// wasmtime run --tcplisten 127.0.0.1:9000 --env 'LISTEN_FDS=1' target/wasm32-wasi/debug/examples/tcp_listenfd_server.wasm +// cargo +nightly build --target wasm32-wasip1 --example tcp_listenfd_server --features="os-poll net" +// wasmtime run --tcplisten 127.0.0.1:9000 --env 'LISTEN_FDS=1' target/wasm32-wasip1/debug/examples/tcp_listenfd_server.wasm use mio::event::Event; use mio::net::{TcpListener, TcpStream};