From fc6bb06ecf55ab92992de9600077a9d08e87a972 Mon Sep 17 00:00:00 2001 From: Frank Rehwinkel Date: Thu, 2 May 2024 09:49:32 -0400 Subject: [PATCH] fix Wasm example instructions --- examples/tcp_listenfd_server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tcp_listenfd_server.rs b/examples/tcp_listenfd_server.rs index 2b8b0c495..3620461b0 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 build --target wasm32-wasi --example tcp_listenfd_server --features="os-poll net" +// wasmtime run -S preview2=n -S tcplisten=127.0.0.1:9000 --env 'LISTEN_FDS=1' ./target/wasm32-wasi/debug/examples/tcp_listenfd_server.wasm use mio::event::Event; use mio::net::{TcpListener, TcpStream};