Files
wasmtime/crates/wasi-common/cap-std-sync/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

38 lines
960 B
TOML

[package]
name = "wasi-cap-std-sync"
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"
readme = "README.md"
edition = "2018"
include = ["src/**/*", "README.md", "LICENSE" ]
[dependencies]
wasi-common = { path = "../", version = "=0.33.0" }
async-trait = "0.1"
anyhow = "1.0"
cap-std = "0.22.0"
cap-fs-ext = "0.22.0"
cap-time-ext = "0.22.0"
cap-rand = "0.22.0"
fs-set-times = "0.14.1"
system-interface = { version = "0.17.0", features = ["cap_std_impls"] }
tracing = "0.1.19"
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"
atty = "0.2.14"
io-extras = "0.12.0"
[dev-dependencies]
tempfile = "3.1.0"