| 1 |
# Change Log |
| 2 |
All notable changes to this project will be documented in this file. |
| 3 |
|
| 4 |
The format is based on [Keep a Changelog](http://keepachangelog.com/) |
| 5 |
and this project adheres to [Semantic Versioning](http://semver.org/). |
| 6 |
|
| 7 |
## [0.9.11] - 2026-06-22 |
| 8 |
### Fixed |
| 9 |
- Fix unchecked pointer arithmatic in `advice_range`, `unchecked_advise_range`, `flush_range` and `flush_async_range`. |
| 10 |
### Changed |
| 11 |
- Bump the MSRV from 1.63 to 1.65. |
| 12 |
|
| 13 |
## [0.9.10] - 2026-02-15 |
| 14 |
### Fixed |
| 15 |
- Fix compilation on AIX targets. |
| 16 |
[@xingxue-ibm](https://github.com/xingxue-ibm) |
| 17 |
### Changed |
| 18 |
- Return `ErrorKind::Unsupported` on unsupported platforms to allow reliable runtime detection. |
| 19 |
[@daxpedda](https://github.com/daxpedda) |
| 20 |
|
| 21 |
## [0.9.9] - 2025-10-21 |
| 22 |
### Fixed |
| 23 |
- Fix compilation on visionOS (and other apple operating systems). |
| 24 |
[@sinkingsugar](https://github.com/sinkingsugar) |
| 25 |
- Do not assume `isize::MAX` fits in a `u64`. |
| 26 |
[@ThomasHabets](https://github.com/ThomasHabets) |
| 27 |
|
| 28 |
## [0.9.8] - 2025-08-22 |
| 29 |
### Added |
| 30 |
- `MmapOptions::no_reserve_swap`. |
| 31 |
[@nhtyy](https://github.com/nhtyy) |
| 32 |
|
| 33 |
## [0.9.7] - 2025-07-13 |
| 34 |
### Fixed |
| 35 |
- Fix incomplete validation of mapping length, which could lead to violation of safety requirements of `slice::from_raw_parts` on 32-bit platforms. |
| 36 |
[@nabijaczleweli](https://github.com/nabijaczleweli) |
| 37 |
|
| 38 |
## [0.9.6] - 2025-05-14 |
| 39 |
### Fixed |
| 40 |
- Fix huge page mappings with non-default page-bits. |
| 41 |
[@Alex1s](https://github.com/Alex1s) |
| 42 |
|
| 43 |
## [0.9.5] - 2024-09-13 |
| 44 |
### Added |
| 45 |
- `Advise::is_supported` and `UncheckedAdvice::is_supported`. Linux only. |
| 46 |
[@xzfc](https://github.com/xzfc) |
| 47 |
- Documentation improvements. |
| 48 |
[@RalfJung](https://github.com/RalfJung) |
| 49 |
[@betelgeuse](https://github.com/betelgeuse) |
| 50 |
[@ADSteele916](https://github.com/ADSteele916) |
| 51 |
|
| 52 |
## [0.9.4] - 2024-01-25 |
| 53 |
### Changed |
| 54 |
- The `libc` crate >= 0.2.151 is required now. |
| 55 |
|
| 56 |
### Fixed |
| 57 |
- Build on Android with an older `libc` crate. |
| 58 |
|
| 59 |
## [0.9.3] - 2023-12-19 |
| 60 |
### Fixed |
| 61 |
- Build on Android. |
| 62 |
|
| 63 |
## [0.9.2] - 2023-12-17 |
| 64 |
### Fixed |
| 65 |
- Build on FreeBSD. |
| 66 |
|
| 67 |
## [0.9.1] - 2023-12-16 |
| 68 |
### Changed |
| 69 |
- Added `MmapOptions::huge` method to support mapping hugetlb. Linux only. |
| 70 |
[@ollie-etl](https://github.com/ollie-etl) |
| 71 |
[@oliverbunting](https://github.com/oliverbunting) |
| 72 |
|
| 73 |
## [0.9.0] - 2023-10-03 |
| 74 |
### Changed |
| 75 |
- The `Advice` struct was split into two enums: `Advice` and `UncheckedAdvice`.<br> |
| 76 |
`Advice` can be passed to safe `advise` and `advise_range` methods. |
| 77 |
And `UncheckedAdvice` can be passed to unsafe `unchecked_advise` |
| 78 |
and `unchecked_advise_range` methods.<br> |
| 79 |
[@adamreichold](https://github.com/adamreichold) |
| 80 |
|
| 81 |
## [0.8.0] - 2023-09-25 |
| 82 |
### Changed |
| 83 |
- The `Advice` type is a struct and not an enum now. |
| 84 |
[@adamreichold](https://github.com/adamreichold) |
| 85 |
|
| 86 |
### Fixed |
| 87 |
- Some of the `Advise` variants were unsound and now require `unsafe` to be constructed. |
| 88 |
[@adamreichold](https://github.com/adamreichold) |
| 89 |
|
| 90 |
## [0.7.1] - 2023-06-24 |
| 91 |
### Fixed |
| 92 |
- Mapping beyond 4GB offset on 32 bit glibc. Linux-only. |
| 93 |
[@lvella](https://github.com/lvella) |
| 94 |
|
| 95 |
## [0.7.0] - 2023-06-08 |
| 96 |
### Added |
| 97 |
- `Mmap::remap`, `MmapMut::remap` and `MmapRaw::remap`. Linux-only. |
| 98 |
[@Phantomical](https://github.com/Phantomical) |
| 99 |
- `Advice::PopulateRead` and `Advice::PopulateWrite`. Linux-only. |
| 100 |
[@Jesse-Bakker](https://github.com/Jesse-Bakker) |
| 101 |
|
| 102 |
### Changed |
| 103 |
- libc crate >= 0.2.143 is required now. |
| 104 |
|
| 105 |
## [0.6.2] - 2023-05-24 |
| 106 |
### Fixed |
| 107 |
- Alignment for empty files on Windows. |
| 108 |
[@timvisee](https://github.com/timvisee) |
| 109 |
|
| 110 |
## [0.6.1] - 2023-05-10 |
| 111 |
### Added |
| 112 |
- Add `MmapOptions::map_raw_read_only` to avoid intermediate invalid `Mmap` instances. |
| 113 |
[@adamreichold](https://github.com/adamreichold) |
| 114 |
|
| 115 |
## [0.6.0] - 2023-05-09 |
| 116 |
### Changed |
| 117 |
- `lock()` and `unlock` methods require `&self` and not `&mut self` now. |
| 118 |
[@timvisee](https://github.com/timvisee) |
| 119 |
|
| 120 |
## [0.5.10] - 2023-02-22 |
| 121 |
### Added |
| 122 |
- `MmapOptions::map_anon` accounts for `populate` on Linux now. |
| 123 |
[@jsgf](https://github.com/jsgf) |
| 124 |
|
| 125 |
## [0.5.9] - 2023-02-17 |
| 126 |
### Added |
| 127 |
- `From<Mmap> for MmapRaw` and `From<MmapMut> for MmapRaw`. |
| 128 |
[@swlynch99](https://github.com/swlynch99) |
| 129 |
- `Mmap::advise_range`, `MmapMut::advise_range`, `MmapRaw::advise_range`. |
| 130 |
[@ho-229](https://github.com/ho-229) |
| 131 |
|
| 132 |
## [0.5.8] - 2022-11-09 |
| 133 |
### Added |
| 134 |
- `MmapRaw::advise`, `MmapRaw::lock` and `MmapRaw::unlock`. |
| 135 |
[@diwic](https://github.com/diwic) |
| 136 |
- Improve `MmapMut::make_exec` documentation. |
| 137 |
|
| 138 |
## [0.5.7] - 2022-08-15 |
| 139 |
### Changed |
| 140 |
- Simplify file size retrieving code. |
| 141 |
[@saethlin](https://github.com/saethlin) |
| 142 |
|
| 143 |
## [0.5.6] - 2022-08-11 |
| 144 |
### Added |
| 145 |
- Memory locking and unlocking. See `Mmap::lock`, `Mmap::unlock`, |
| 146 |
`MmapMut::lock` and `MmapMut::unlock`. |
| 147 |
[@vmx](https://github.com/vmx) |
| 148 |
|
| 149 |
## [0.5.5] - 2022-07-09 |
| 150 |
### Fixed |
| 151 |
- Limit mapping length to `isize::MAX` to prevent undefined behavior |
| 152 |
on calling `std::slice::from_raw_parts`. Technically affects only 32-bit systems. |
| 153 |
[@adamreichold](https://github.com/adamreichold) |
| 154 |
|
| 155 |
## [0.5.4] - 2022-06-04 |
| 156 |
### Added |
| 157 |
- Add madvice operations specific to Darwin. [@turbocool3r](https://github.com/turbocool3r) |
| 158 |
- Implement common traits for the `Advice` enum. [@nyurik](https://github.com/nyurik) |
| 159 |
|
| 160 |
### Changed |
| 161 |
- Make stub implementation Infallible. [@coolreader18](https://github.com/coolreader18) |
| 162 |
- Use `tempfile` crate instead of `tempdir` in tests. |
| 163 |
[@alexanderkjall](https://github.com/alexanderkjall) |
| 164 |
|
| 165 |
## [0.5.3] - 2022-02-10 |
| 166 |
### Added |
| 167 |
- `Mmap::advise` and `MmapMut::advise`. [@nyurik](https://github.com/nyurik) |
| 168 |
|
| 169 |
## [0.5.2] - 2022-01-10 |
| 170 |
### Added |
| 171 |
- `flush`, `flush_async`, `flush_range` and `flush_async_range` to `MmapRaw` matching |
| 172 |
the corresponding methods on `MmapMut`. |
| 173 |
[@cberner](https://github.com/cberner) |
| 174 |
|
| 175 |
## [0.5.1] - 2022-01-09 |
| 176 |
### Fixed |
| 177 |
- Explicitly call `fstat64` on Linux, emscripten and l4re targets. |
| 178 |
[@adamreichold](https://github.com/adamreichold) |
| 179 |
|
| 180 |
## [0.5.0] - 2021-09-19 |
| 181 |
### Added |
| 182 |
- `MmapOptions` accepts any type that supports `RawHandle`/`RawFd` returning now. |
| 183 |
This allows using `memmap2` not only with Rust std types, but also with |
| 184 |
[async-std](https://github.com/async-rs/async-std) one. |
| 185 |
[@adamreichold](https://github.com/adamreichold) |
| 186 |
- (unix) Memoize page size to avoid repeatedly calling into sysconf machinery. |
| 187 |
[@adamreichold](https://github.com/adamreichold) |
| 188 |
|
| 189 |
### Changed |
| 190 |
- (win) Use `std::os::windows::io::AsRawHandle` directly, without relying on `std::fs::File`. |
| 191 |
[@adamreichold](https://github.com/adamreichold) |
| 192 |
- Do not panic when failing to release resources in Drop impls. |
| 193 |
[@adamreichold](https://github.com/adamreichold) |
| 194 |
|
| 195 |
## [0.4.0] - 2021-09-16 |
| 196 |
### Added |
| 197 |
- Optional [`StableDeref`](https://github.com/storyyeller/stable_deref_trait) support. |
| 198 |
[@SimonSapin](https://github.com/SimonSapin) |
| 199 |
|
| 200 |
### Changed |
| 201 |
- Mapping of zero-sized files is no longer an error. |
| 202 |
[@SimonSapin](https://github.com/SimonSapin) |
| 203 |
- MSRV changed from 1.31 to 1.36 |
| 204 |
|
| 205 |
## [0.3.1] - 2021-08-15 |
| 206 |
### Fixed |
| 207 |
- Integer overflow during file length calculation on 32bit targets. |
| 208 |
- Stub implementation. [@Mrmaxmeier](https://github.com/Mrmaxmeier) |
| 209 |
|
| 210 |
## [0.3.0] - 2021-06-10 |
| 211 |
### Changed |
| 212 |
- `MmapOptions` allows mapping using Unix descriptors and not only `std::fs::File` now. |
| 213 |
[@mripard](https://github.com/mripard) |
| 214 |
|
| 215 |
## [0.2.3] - 2021-05-24 |
| 216 |
### Added |
| 217 |
- Allow compilation on unsupported platforms. |
| 218 |
The code will panic on access just like in `std`. |
| 219 |
[@jcaesar](https://github.com/jcaesar) |
| 220 |
|
| 221 |
## [0.2.2] - 2021-04-03 |
| 222 |
### Added |
| 223 |
- `MmapOptions::populate`. [@adamreichold](https://github.com/adamreichold) |
| 224 |
|
| 225 |
### Fixed |
| 226 |
- Fix alignment computation for `flush_async` to match `flush`. |
| 227 |
[@adamreichold](https://github.com/adamreichold) |
| 228 |
|
| 229 |
## [0.2.1] - 2021-02-08 |
| 230 |
### Added |
| 231 |
- `MmapOptions::map_raw` and `MmapRaw`. [@diwic](https://github.com/diwic) |
| 232 |
|
| 233 |
## [0.2.0] - 2020-12-19 |
| 234 |
### Changed |
| 235 |
- MSRV is 1.31 now (edition 2018). |
| 236 |
- Make anonymous memory maps private by default on unix. [@CensoredUsername](https://github.com/CensoredUsername) |
| 237 |
- Add `map_copy_read_only`. [@zseri](https://github.com/zseri) |
| 238 |
|
| 239 |
## 0.1.0 - 2020-01-18 |
| 240 |
### Added |
| 241 |
- Fork [memmap-rs](https://github.com/danburkert/memmap-rs). |
| 242 |
|
| 243 |
### Changed |
| 244 |
- Use `LICENSE-APACHE` instead of `README.md` for some tests since it's immutable. |
| 245 |
|
| 246 |
### Removed |
| 247 |
- `winapi` dependency. [memmap-rs/pull/89](https://github.com/danburkert/memmap-rs/pull/89) |
| 248 |
|
| 249 |
[Unreleased]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.5...HEAD |
| 250 |
[0.9.5]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.4...v0.9.5 |
| 251 |
[0.9.4]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.3...v0.9.4 |
| 252 |
[0.9.3]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.2...v0.9.3 |
| 253 |
[0.9.2]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.1...v0.9.2 |
| 254 |
[0.9.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.0...v0.9.1 |
| 255 |
[0.9.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.8.0...v0.9.0 |
| 256 |
[0.8.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.7.1...v0.8.0 |
| 257 |
[0.7.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.7.0...v0.7.1 |
| 258 |
[0.7.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.6.2...v0.7.0 |
| 259 |
[0.6.2]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.6.1...v0.6.2 |
| 260 |
[0.6.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.6.0...v0.6.1 |
| 261 |
[0.6.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.10...v0.6.0 |
| 262 |
[0.5.10]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.9...v0.5.10 |
| 263 |
[0.5.9]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.8...v0.5.9 |
| 264 |
[0.5.8]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.7...v0.5.8 |
| 265 |
[0.5.7]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.6...v0.5.7 |
| 266 |
[0.5.6]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.5...v0.5.6 |
| 267 |
[0.5.5]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.4...v0.5.5 |
| 268 |
[0.5.4]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.3...v0.5.4 |
| 269 |
[0.5.3]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.2...v0.5.3 |
| 270 |
[0.5.2]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.1...v0.5.2 |
| 271 |
[0.5.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.0...v0.5.1 |
| 272 |
[0.5.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.4.0...v0.5.0 |
| 273 |
[0.4.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.3.1...v0.4.0 |
| 274 |
[0.3.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.3.0...v0.3.1 |
| 275 |
[0.3.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.3...v0.3.0 |
| 276 |
[0.2.3]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.2...v0.2.3 |
| 277 |
[0.2.2]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.1...v0.2.2 |
| 278 |
[0.2.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.0...v0.2.1 |
| 279 |
[0.2.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.1.0...v0.2.0 |