Files
wasmtime/crates/wasi-common/tokio/Cargo.toml
Harald Hoyer 853a025613 Implement sock_accept
With the addition of `sock_accept()` in `wasi-0.11.0`, wasmtime can now
implement basic networking for pre-opened sockets.

For Windows `AsHandle` was replaced with `AsRawHandleOrSocket` to cope
with the duality of Handles and Sockets.

For Unix a `wasi_cap_std_sync::net::Socket` enum was created to handle
the {Tcp,Unix}{Listener,Stream} more efficiently in
`WasiCtxBuilder::preopened_socket()`.

The addition of that many `WasiFile` implementors was mainly necessary,
because of the difference in the `num_ready_bytes()` function.

A known issue is Windows now busy polling on sockets, because except
for `stdin`, nothing is querying the status of windows handles/sockets.

Another know issue on Windows, is that there is no crate providing
support for `fcntl(fd, F_GETFL, 0)` on a socket.

Signed-off-by: Harald Hoyer <harald@profian.com>
2022-01-31 16:25:11 -08:00

35 lines
1.0 KiB
TOML

[package]
name = "wasi-tokio"
version = "0.33.0"
authors = ["The Wasmtime Project Developers"]
description = "WASI implementation in Rust"
license = "Apache-2.0 WITH LLVM-exception"
categories = ["wasm"]
keywords = ["webassembly", "wasm"]
repository = "https://github.com/bytecodealliance/wasmtime"
edition = "2018"
include = ["src/**/*", "LICENSE" ]
[dependencies]
wasi-common = { path = "../", version = "=0.33.0" }
wasi-cap-std-sync = { path = "../cap-std-sync", version = "=0.33.0" }
wiggle = { path = "../../wiggle", version = "=0.33.0" }
tokio = { version = "1.8.0", features = [ "rt", "fs", "time", "io-util", "net", "io-std", "rt-multi-thread"] }
cap-std = "0.22.0"
anyhow = "1"
io-lifetimes = { version = "0.4.4", default-features = false }
[target.'cfg(unix)'.dependencies]
rustix = "0.31.0"
[target.'cfg(windows)'.dependencies]
winapi = "0.3"
lazy_static = "1.4"
io-extras = "0.12.0"
[dev-dependencies]
tempfile = "3.1.0"
tokio = { version = "1.8.0", features = [ "macros" ] }
anyhow = "1"
cap-tempfile = "0.22.0"