Update WASI to cap-std 0.25 and windows-sys. (#4302)
This updates to rustix 0.35.6, and updates wasi-common to use cap-std 0.25 and windows-sys (instead of winapi). Changes include: - Better error code mappings on Windows. - Fixes undefined references to `utimensat` on Darwin. - Fixes undefined references to `preadv64` and `pwritev64` on Android. - Updates to io-lifetimes 0.7, which matches the io_safety API in Rust. - y2038 bug fixes for 32-bit platforms
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
))]
|
||||
mod tests {
|
||||
use anyhow::Result;
|
||||
use rustix::io::{mprotect, MprotectFlags};
|
||||
use rustix::mm::{mprotect, MprotectFlags};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use wasmtime::unix::StoreExt;
|
||||
|
||||
@@ -3,7 +3,7 @@ mod not_for_windows {
|
||||
use wasmtime::*;
|
||||
use wasmtime_environ::{WASM32_MAX_PAGES, WASM_PAGE_SIZE};
|
||||
|
||||
use rustix::io::{mmap_anonymous, mprotect, munmap, MapFlags, MprotectFlags, ProtFlags};
|
||||
use rustix::mm::{mmap_anonymous, mprotect, munmap, MapFlags, MprotectFlags, ProtFlags};
|
||||
|
||||
use std::convert::TryFrom;
|
||||
use std::ptr::null_mut;
|
||||
@@ -19,7 +19,7 @@ mod not_for_windows {
|
||||
|
||||
impl CustomMemory {
|
||||
unsafe fn new(minimum: usize, maximum: usize, glob_counter: Arc<Mutex<usize>>) -> Self {
|
||||
let page_size = rustix::process::page_size();
|
||||
let page_size = rustix::param::page_size();
|
||||
let guard_size = page_size;
|
||||
let size = maximum + guard_size;
|
||||
assert_eq!(size % page_size, 0); // we rely on WASM_PAGE_SIZE being multiple of host page size
|
||||
|
||||
Reference in New Issue
Block a user