Port wasi-common from unsafe-io to io-lifetimes (#3049)
* Port wasi-common to io-lifetimes. This ports wasi-common from unsafe-io to io-lifetimes. Ambient authority is now indicated via calls to `ambient_authority()` from the ambient-authority crate, rather than using `unsafe` blocks. The `GetSetFdFlags::set_fd_flags` function is now split into two phases, to simplify lifetimes in implementations which need to close and re-open the underlying file. * Use posish for errno values instead of libc. This eliminates one of the few remaining direct libc dependencies. * Port to posish::io::poll. Use posish::io::poll instead of calling libc directly. This factors out more code from Wasmtime, and eliminates the need to manipulate raw file descriptors directly. And, this eliminates the last remaining direct dependency on libc in wasi-common. * Port wasi-c-api to io-lifetimes. * Update to posish 0.16.0. * Embeded NULs in filenames now get `EINVAL` instead of `EILSEQ`. * Accept either `EILSEQ` or `EINVAL` for embedded NULs. * Bump the nightly toolchain to 2021-07-12. This fixes build errors on the semver crate, which as of this writing builds with latest nightly and stable but not 2021-04-11, the old pinned version. * Have cap-std-sync re-export ambient_authority so that users get the same version.
This commit is contained in:
@@ -22,7 +22,7 @@ wasmtime-wasi = { path = "../wasi" }
|
||||
wasmtime-wasi-crypto = { path = "../wasi-crypto", optional = true }
|
||||
wasmtime-wasi-nn = { path = "../wasi-nn", optional = true }
|
||||
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync" }
|
||||
cap-std = "0.13"
|
||||
cap-std = "0.16.0"
|
||||
|
||||
[dev-dependencies]
|
||||
wat = "1.0"
|
||||
|
||||
Reference in New Issue
Block a user