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:
Dan Gohman
2021-12-17 12:00:11 -08:00
committed by GitHub
parent e94ebc2263
commit 7b346b1f12
17 changed files with 70 additions and 69 deletions

View File

@@ -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']

View File

@@ -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));
}