Migrate from winapi to windows-sys (#4346)
* Migrate from `winapi` to `windows-sys` I believe that Microsoft itself is supporting the development of `windows-sys` and it's also used by `cap-std` now so this switches Wasmtime's dependencies on Windows APIs from the `winapi` crate to the `windows-sys` crate. We still have `winapi` in our dependency graph but that may get phased out over time. * Make windows-sys a target-specific dependency
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use anyhow::{bail, Result};
|
||||
use winapi::um::memoryapi::{VirtualAlloc, VirtualFree};
|
||||
use winapi::um::winnt::{MEM_COMMIT, MEM_DECOMMIT, PAGE_READWRITE};
|
||||
use windows_sys::Win32::System::Memory::*;
|
||||
|
||||
pub fn commit(addr: *mut u8, len: usize) -> Result<()> {
|
||||
if len == 0 {
|
||||
|
||||
Reference in New Issue
Block a user