Hacker News new | ask | show | jobs
by bkolobara 1474 days ago
Hi, author here. All examples should have used `lunatic::net`, I fixed it now.

The reason why we provide `lunatic::net` and you can't just use `std::net` is that WASI (system interface for WebAssembly) still doesn't have support for sockets[0]. `lunatic::net::TcpStream` is for now just a drop in replacement for `std::net::TcpStream` and once sockets get standardised you will be able to use the standard library types instead.

[0]: https://github.com/WebAssembly/WASI/pull/312