Update to cap-std 0.22.0. (#3611)
* Update to cap-std 0.22.0. The main change relevant to Wasmtime here is that this includes the rustix fix for compilation errors on Rust nightly with the `asm!` macro. * Add itoa to deny.toml. * Update the doc and fuzz builds to the latest Rust nightly. * Update to libc 0.2.112 to pick up the `POLLRDHUP` fix. * Update to cargo-fuzz 0.11, for compatibility with Rust nightly. This appears to be the fix for rust-fuzz/cargo-fuzz#277.
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.21.1"
|
||||
cap-std = "0.22.0"
|
||||
|
||||
[dev-dependencies]
|
||||
wat = "1.0"
|
||||
|
||||
@@ -272,20 +272,20 @@ pub extern "C" fn wasm_bench_create(
|
||||
|
||||
let stdout = std::fs::File::create(&stdout_path)
|
||||
.with_context(|| format!("failed to create {}", stdout_path.display()))?;
|
||||
let stdout = cap_std::fs::File::from_std(stdout, cap_std::ambient_authority());
|
||||
let stdout = cap_std::fs::File::from_std(stdout);
|
||||
let stdout = wasi_cap_std_sync::file::File::from_cap_std(stdout);
|
||||
cx = cx.stdout(Box::new(stdout));
|
||||
|
||||
let stderr = std::fs::File::create(&stderr_path)
|
||||
.with_context(|| format!("failed to create {}", stderr_path.display()))?;
|
||||
let stderr = cap_std::fs::File::from_std(stderr, cap_std::ambient_authority());
|
||||
let stderr = cap_std::fs::File::from_std(stderr);
|
||||
let stderr = wasi_cap_std_sync::file::File::from_cap_std(stderr);
|
||||
cx = cx.stderr(Box::new(stderr));
|
||||
|
||||
if let Some(stdin_path) = &stdin_path {
|
||||
let stdin = std::fs::File::open(stdin_path)
|
||||
.with_context(|| format!("failed to open {}", stdin_path.display()))?;
|
||||
let stdin = cap_std::fs::File::from_std(stdin, cap_std::ambient_authority());
|
||||
let stdin = cap_std::fs::File::from_std(stdin);
|
||||
let stdin = wasi_cap_std_sync::file::File::from_cap_std(stdin);
|
||||
cx = cx.stdin(Box::new(stdin));
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ wat = { version = "1.0.36", optional = true }
|
||||
# Optional dependencies for the `wasi` feature
|
||||
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", optional = true }
|
||||
wasmtime-wasi = { path = "../wasi", optional = true }
|
||||
cap-std = { version = "0.21.1", optional = true }
|
||||
cap-std = { version = "0.22.0", optional = true }
|
||||
|
||||
[features]
|
||||
default = ['jitdump', 'wat', 'wasi', 'cache']
|
||||
|
||||
@@ -70,21 +70,21 @@ impl wasi_config_t {
|
||||
if self.inherit_stdin {
|
||||
builder = builder.inherit_stdin();
|
||||
} else if let Some(file) = self.stdin {
|
||||
let file = cap_std::fs::File::from_std(file, ambient_authority());
|
||||
let file = cap_std::fs::File::from_std(file);
|
||||
let file = wasi_cap_std_sync::file::File::from_cap_std(file);
|
||||
builder = builder.stdin(Box::new(file));
|
||||
}
|
||||
if self.inherit_stdout {
|
||||
builder = builder.inherit_stdout();
|
||||
} else if let Some(file) = self.stdout {
|
||||
let file = cap_std::fs::File::from_std(file, ambient_authority());
|
||||
let file = cap_std::fs::File::from_std(file);
|
||||
let file = wasi_cap_std_sync::file::File::from_cap_std(file);
|
||||
builder = builder.stdout(Box::new(file));
|
||||
}
|
||||
if self.inherit_stderr {
|
||||
builder = builder.inherit_stderr();
|
||||
} else if let Some(file) = self.stderr {
|
||||
let file = cap_std::fs::File::from_std(file, ambient_authority());
|
||||
let file = cap_std::fs::File::from_std(file);
|
||||
let file = wasi_cap_std_sync::file::File::from_cap_std(file);
|
||||
builder = builder.stderr(Box::new(file));
|
||||
}
|
||||
|
||||
2
crates/cache/Cargo.toml
vendored
2
crates/cache/Cargo.toml
vendored
@@ -24,7 +24,7 @@ zstd = { version = "0.9", default-features = false }
|
||||
winapi = "0.3.7"
|
||||
|
||||
[target.'cfg(not(target_os = "windows"))'.dependencies]
|
||||
rustix = "0.26.2"
|
||||
rustix = "0.31.0"
|
||||
|
||||
[dev-dependencies]
|
||||
filetime = "0.2.7"
|
||||
|
||||
@@ -14,7 +14,7 @@ edition = "2018"
|
||||
links = "wasmtime-fiber-shims"
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
rustix = "0.26.2"
|
||||
rustix = "0.31.0"
|
||||
|
||||
[target.'cfg(windows)'.dependencies.winapi]
|
||||
version = "0.3.9"
|
||||
|
||||
@@ -29,7 +29,7 @@ bincode = "1.2.1"
|
||||
winapi = { version = "0.3.8", features = ["winnt", "impl-default"] }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
rustix = { version = "0.26.2", optional = true }
|
||||
rustix = { version = "0.31.0", optional = true }
|
||||
|
||||
[features]
|
||||
jitdump = ['rustix']
|
||||
|
||||
@@ -14,7 +14,7 @@ edition = "2018"
|
||||
wasmtime-environ = { path = "../environ", version = "=0.32.0" }
|
||||
wasmtime-fiber = { path = "../fiber", version = "=0.32.0", optional = true }
|
||||
region = "2.1.0"
|
||||
libc = { version = "0.2.82", default-features = false }
|
||||
libc = { version = "0.2.112", default-features = false }
|
||||
log = "0.4.8"
|
||||
memoffset = "0.6.0"
|
||||
indexmap = "1.0.2"
|
||||
@@ -30,7 +30,7 @@ anyhow = "1.0.38"
|
||||
mach = "0.3.2"
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
rustix = "0.26.2"
|
||||
rustix = "0.31.0"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
winapi = { version = "0.3.7", features = ["winbase", "memoryapi", "errhandlingapi", "handleapi"] }
|
||||
|
||||
@@ -21,7 +21,7 @@ tempfile = "3.1.0"
|
||||
os_pipe = "0.9"
|
||||
anyhow = "1.0.19"
|
||||
wat = "1.0.37"
|
||||
cap-std = "0.21.1"
|
||||
cap-std = "0.22.0"
|
||||
tokio = { version = "1.8.0", features = ["rt-multi-thread"] }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -22,12 +22,12 @@ anyhow = "1.0"
|
||||
thiserror = "1.0"
|
||||
wiggle = { path = "../wiggle", default-features = false, version = "=0.32.0" }
|
||||
tracing = "0.1.19"
|
||||
cap-std = "0.21.1"
|
||||
cap-rand = "0.21.1"
|
||||
cap-std = "0.22.0"
|
||||
cap-rand = "0.22.0"
|
||||
bitflags = "1.2"
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
rustix = "0.26.2"
|
||||
rustix = "0.31.0"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = "0.3"
|
||||
|
||||
@@ -15,17 +15,17 @@ include = ["src/**/*", "README.md", "LICENSE" ]
|
||||
wasi-common = { path = "../", version = "=0.32.0" }
|
||||
async-trait = "0.1"
|
||||
anyhow = "1.0"
|
||||
cap-std = "0.21.1"
|
||||
cap-fs-ext = "0.21.1"
|
||||
cap-time-ext = "0.21.1"
|
||||
cap-rand = "0.21.1"
|
||||
fs-set-times = "0.13.1"
|
||||
system-interface = { version = "0.16.0", features = ["cap_std_impls"] }
|
||||
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.3.3", default-features = false }
|
||||
io-lifetimes = { version = "0.4.4", default-features = false }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
rustix = "0.26.2"
|
||||
rustix = "0.31.0"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = "0.3"
|
||||
|
||||
@@ -122,7 +122,7 @@ impl TryFrom<std::io::Error> for types::Errno {
|
||||
Some(Error::IO) => Some(types::Errno::Io),
|
||||
Some(Error::BADF) => Some(types::Errno::Badf),
|
||||
Some(Error::BUSY) => Some(types::Errno::Busy),
|
||||
Some(Error::ACCES) => Some(types::Errno::Acces),
|
||||
Some(Error::ACCESS) => Some(types::Errno::Acces),
|
||||
Some(Error::FAULT) => Some(types::Errno::Fault),
|
||||
Some(Error::NOTDIR) => Some(types::Errno::Notdir),
|
||||
Some(Error::ISDIR) => Some(types::Errno::Isdir),
|
||||
|
||||
@@ -15,12 +15,12 @@ wasi-common = { path = "../", version = "=0.32.0" }
|
||||
wasi-cap-std-sync = { path = "../cap-std-sync", version = "=0.32.0" }
|
||||
wiggle = { path = "../../wiggle", version = "=0.32.0" }
|
||||
tokio = { version = "1.8.0", features = [ "rt", "fs", "time", "io-util", "net", "io-std", "rt-multi-thread"] }
|
||||
cap-std = "0.21.1"
|
||||
cap-std = "0.22.0"
|
||||
anyhow = "1"
|
||||
io-lifetimes = { version = "0.3.0", default-features = false }
|
||||
io-lifetimes = { version = "0.4.4", default-features = false }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
rustix = "0.26.2"
|
||||
rustix = "0.31.0"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = "0.3"
|
||||
@@ -30,4 +30,4 @@ lazy_static = "1.4"
|
||||
tempfile = "3.1.0"
|
||||
tokio = { version = "1.8.0", features = [ "macros" ] }
|
||||
anyhow = "1"
|
||||
cap-tempfile = "0.21.1"
|
||||
cap-tempfile = "0.22.0"
|
||||
|
||||
Reference in New Issue
Block a user