|
|
|
|
|
by tredre3
1046 days ago
|
|
> Wonder if you can mmap the binary model in without unsafe?? Some operating systems do provide the proper guarantees to make mmap safe, but Rust decided it would be best to assume it's unsafe and maintain a uniform API. Which is probably a good call, it is notoriously difficult to get a readonly mmap to be entirely safe on Linux. https://docs.rs/mmap-rs/latest/mmap_rs/struct.MmapOptions.ht... |
|
If you map the file into readonly memory and than get references to it, the underlying memory can mutate (eg: by modifying the file itself).