Open steveklabnik opened 9 years ago
First platform specific versions of these things should be written in the relative platform specific sys modules. Once they're both written, then we can improve the cross platform API.
Any update on this?
The current status is to just use https://github.com/danburkert/memmap-rs
FWIW, we found memmap-rs to be near-impossible to use safely for our usage, and thus we wrote https://github.com/standard-ai/shmem -- though it's not published on crates.io yet because we noticed the name was taken at the time of open-sourcing it and haven't taken the time to (most importantly) find a new name, change its name and publish it yet. If you're interested in it, feel free to leave a message on its issue tracker.
Maybe the API we chose might be to consider for such a concern, in addition to the API memmap-rs chose?
Issue by thestinger Saturday Sep 06, 2014 at 18:13 GMT
For earlier discussion, see https://github.com/rust-lang/rust/issues/17047
This issue was labelled with: A-libs, I-enhancement in the Rust repository
Rust should expose a portable implementation of the
mmap
,mprotect
andmlock
functionality (VirtualAlloc
,VirtualProtect
,VirtualLock
on Windows). The current support for memory mapped files is very lacking. The low-level support should be exposed viaunsafe
functions, and then a new high-level wrapper can be written on top of it.