about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-28 15:20:22 +0100
committerGitHub <noreply@github.com>2022-01-28 15:20:22 +0100
commit9f15c4d08b7d5eec77f6a6e4caa2ee720fbc51c2 (patch)
tree12a423f1e03aa049bc6a990199b6d9c464260602 /compiler/rustc_codegen_llvm/src
parentdb6ca2532579bb330366a1265856f3785b78e3a9 (diff)
parentd2a13693c2858b6b0fe1feb2dfff604bc2b0aa30 (diff)
downloadrust-9f15c4d08b7d5eec77f6a6e4caa2ee720fbc51c2.tar.gz
rust-9f15c4d08b7d5eec77f6a6e4caa2ee720fbc51c2.zip
Rollup merge of #93158 - haraldh:wasi_sock_accept, r=dtolnay
wasi: implement `sock_accept` and enable networking

With the addition of `sock_accept()` to snapshot1, simple networking via a passed `TcpListener` is possible. This PR implements the basics to make a simple server work.

See also:
* [wasmtime tracking issue](https://github.com/bytecodealliance/wasmtime/issues/3730)
* [wasmtime PR](https://github.com/bytecodealliance/wasmtime/pull/3711)

TODO:
* [ ] Discussion of `SocketAddr` return value for `::accept()`

```rust
        Ok((
            TcpStream::from_inner(unsafe { Socket::from_raw_fd(fd as _) }),
            // WASI has no concept of SocketAddr yet
            // return an unspecified IPv4Addr
            SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),
        ))
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions