Closed ClownLoverXxx closed 5 months ago
I utilizes mmap instead of reading the file to make it faster and consumes as less RAM as possible, which breaks support on non-unix OSes such as Windows.
Is there a way i can run this into windows?
What should i put in the code instead of "mmap" for windows?
Windows support added
Hello! I'm trying to compile the file via MSCV. I used "cargo build", OPEN SSL libraries are installed, c++ and rust libraries too. But i get this error message when compiling:
error[E0432]: unresolved import std::os::fd --> src\mmap.rs:1:14 | 1 | use std::os::fd::AsRawFd; | ^^ could not find fd in os
error[E0425]: cannot find function mmap in crate libc --> src\mmap.rs:7:15 | 7 | libc::mmap( | ^^^^ not found in libc
error[E0425]: cannot find value PROT_READ in crate libc --> src\mmap.rs:10:19 | 10 | libc::PROT_READ, | ^^^^^^^^^ not found in libc
error[E0425]: cannot find value MAP_PRIVATE in crate libc --> src\mmap.rs:11:19 | 11 | libc::MAP_PRIVATE, | ^^^^^^^^^^^ not found in libc
error[E0425]: cannot find value MAP_FAILED in crate libc --> src\mmap.rs:17:24 | 17 | if mapped == libc::MAP_FAILED { | ^^^^^^^^^^ not found in libc
help: there is a method as_raw_handle with a similar name | 12 | file.as_raw_handle(), |
~~~~~Can you please help me?