1# Change Log
2All notable changes to this project will be documented in this file.
3
4The format is based on [Keep a Changelog](http://keepachangelog.com/)
5and this project adheres to [Semantic Versioning](http://semver.org/).
6
7## [Unreleased]
8
9## [0.8.0] - 2023-09-25
10### Changed
11- The `Advice` type is a struct and not an enum now.
12  [@adamreichold](https://github.com/adamreichold)
13
14### Fixed
15- Some of the `Advise` variants were unsound and now require `unsafe` to be constructed.
16  [@adamreichold](https://github.com/adamreichold)
17
18## [0.7.1] - 2023-06-24
19### Fixed
20- Mapping beyond 4GB offset on 32 bit glibc. Linux-only.
21  [@lvella](https://github.com/lvella)
22
23## [0.7.0] - 2023-06-08
24### Added
25- `Mmap::remap`, `MmapMut::remap` and `MmapRaw::remap`. Linux-only.
26  [@Phantomical](https://github.com/Phantomical)
27- `Advice::PopulateRead` and `Advice::PopulateWrite`. Linux-only.
28  [@Jesse-Bakker](https://github.com/Jesse-Bakker)
29
30### Changed
31- libc crate >= 0.2.143 is required now.
32
33## [0.6.2] - 2023-05-24
34### Fixed
35- Alignment for empty files on Windows.
36  [@timvisee](https://github.com/timvisee)
37
38## [0.6.1] - 2023-05-10
39### Added
40- Add `MmapOptions::map_raw_read_only` to avoid intermediate invalid `Mmap` instances.
41  [@adamreichold](https://github.com/adamreichold)
42
43## [0.6.0] - 2023-05-09
44### Changed
45- `lock()` and `unlock` methods require `&self` and not `&mut self` now.
46  [@timvisee](https://github.com/timvisee)
47
48## [0.5.10] - 2023-02-22
49### Added
50- `MmapOptions::map_anon` accounts for `populate` on Linux now.
51  [@jsgf](https://github.com/jsgf)
52
53## [0.5.9] - 2023-02-17
54### Added
55- `From<Mmap> for MmapRaw` and `From<MmapMut> for MmapRaw`.
56  [@swlynch99](https://github.com/swlynch99)
57- `Mmap::advise_range`, `MmapMut::advise_range`, `MmapRaw::advise_range`.
58  [@ho-229](https://github.com/ho-229)
59
60## [0.5.8] - 2022-11-09
61### Added
62- `MmapRaw::advise`, `MmapRaw::lock` and `MmapRaw::unlock`.
63  [@diwic](https://github.com/diwic)
64- Improve `MmapMut::make_exec` documentation.
65
66## [0.5.7] - 2022-08-15
67### Changed
68- Simplify file size retrieving code.
69  [@saethlin](https://github.com/saethlin)
70
71## [0.5.6] - 2022-08-11
72### Added
73- Memory locking and unlocking. See `Mmap::lock`, `Mmap::unlock`,
74  `MmapMut::lock` and `MmapMut::unlock`.
75  [@vmx](https://github.com/vmx)
76
77## [0.5.5] - 2022-07-09
78### Fixed
79- Limit mapping length to `isize::MAX` to prevent undefined behavior
80  on calling `std::slice::from_raw_parts`. Technically affects only 32-bit systems.
81  [@adamreichold](https://github.com/adamreichold)
82
83## [0.5.4] - 2022-06-04
84### Added
85- Add madvice operations specific to Darwin. [@turbocool3r](https://github.com/turbocool3r)
86- Implement common traits for the `Advice` enum. [@nyurik](https://github.com/nyurik)
87
88### Changed
89- Make stub implementation Infallible. [@coolreader18](https://github.com/coolreader18)
90- Use `tempfile` crate instead of `tempdir` in tests.
91  [@alexanderkjall](https://github.com/alexanderkjall)
92
93## [0.5.3] - 2022-02-10
94### Added
95- `Mmap::advise` and `MmapMut::advise`. [@nyurik](https://github.com/nyurik)
96
97## [0.5.2] - 2022-01-10
98### Added
99- `flush`, `flush_async`, `flush_range` and `flush_async_range` to `MmapRaw` matching
100  the corresponding methods on `MmapMut`.
101  [@cberner](https://github.com/cberner)
102
103## [0.5.1] - 2022-01-09
104### Fixed
105- Explicitly call `fstat64` on Linux, emscripten and l4re targets.
106  [@adamreichold](https://github.com/adamreichold)
107
108## [0.5.0] - 2021-09-19
109### Added
110- `MmapOptions` accepts any type that supports `RawHandle`/`RawFd` returning now.
111  This allows using `memmap2` not only with Rust std types, but also with
112  [async-std](https://github.com/async-rs/async-std) one.
113  [@adamreichold](https://github.com/adamreichold)
114- (unix) Memoize page size to avoid repeatedly calling into sysconf machinery.
115  [@adamreichold](https://github.com/adamreichold)
116
117### Changed
118- (win) Use `std::os::windows::io::AsRawHandle` directly, without relying on `std::fs::File`.
119  [@adamreichold](https://github.com/adamreichold)
120- Do not panic when failing to release resources in Drop impls.
121  [@adamreichold](https://github.com/adamreichold)
122
123## [0.4.0] - 2021-09-16
124### Added
125- Optional [`StableDeref`](https://github.com/storyyeller/stable_deref_trait) support.
126  [@SimonSapin](https://github.com/SimonSapin)
127
128### Changed
129- Mapping of zero-sized files is no longer an error.
130  [@SimonSapin](https://github.com/SimonSapin)
131- MSRV changed from 1.31 to 1.36
132
133## [0.3.1] - 2021-08-15
134### Fixed
135- Integer overflow during file length calculation on 32bit targets.
136- Stub implementation. [@Mrmaxmeier](https://github.com/Mrmaxmeier)
137
138## [0.3.0] - 2021-06-10
139### Changed
140- `MmapOptions` allows mapping using Unix descriptors and not only `std::fs::File` now.
141  [@mripard](https://github.com/mripard)
142
143## [0.2.3] - 2021-05-24
144### Added
145- Allow compilation on unsupported platforms.
146  The code will panic on access just like in `std`.
147  [@jcaesar](https://github.com/jcaesar)
148
149## [0.2.2] - 2021-04-03
150### Added
151- `MmapOptions::populate`. [@adamreichold](https://github.com/adamreichold)
152
153### Fixed
154- Fix alignment computation for `flush_async` to match `flush`.
155  [@adamreichold](https://github.com/adamreichold)
156
157## [0.2.1] - 2021-02-08
158### Added
159- `MmapOptions::map_raw` and `MmapRaw`. [@diwic](https://github.com/diwic)
160
161## [0.2.0] - 2020-12-19
162### Changed
163- MSRV is 1.31 now (edition 2018).
164- Make anonymous memory maps private by default on unix. [@CensoredUsername](https://github.com/CensoredUsername)
165- Add `map_copy_read_only`. [@zseri](https://github.com/zseri)
166
167## 0.1.0 - 2020-01-18
168### Added
169- Fork [memmap-rs](https://github.com/danburkert/memmap-rs).
170
171### Changed
172- Use `LICENSE-APACHE` instead of `README.md` for some tests since it's immutable.
173
174### Removed
175- `winapi` dependency. [memmap-rs/pull/89](https://github.com/danburkert/memmap-rs/pull/89)
176
177[Unreleased]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.8.0...HEAD
178[0.8.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.7.1...v0.8.0
179[0.7.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.7.0...v0.7.1
180[0.7.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.6.2...v0.7.0
181[0.6.2]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.6.1...v0.6.2
182[0.6.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.6.0...v0.6.1
183[0.6.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.10...v0.6.0
184[0.5.10]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.9...v0.5.10
185[0.5.9]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.8...v0.5.9
186[0.5.8]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.7...v0.5.8
187[0.5.7]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.6...v0.5.7
188[0.5.6]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.5...v0.5.6
189[0.5.5]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.4...v0.5.5
190[0.5.4]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.3...v0.5.4
191[0.5.3]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.2...v0.5.3
192[0.5.2]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.1...v0.5.2
193[0.5.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.0...v0.5.1
194[0.5.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.4.0...v0.5.0
195[0.4.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.3.1...v0.4.0
196[0.3.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.3.0...v0.3.1
197[0.3.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.3...v0.3.0
198[0.2.3]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.2...v0.2.3
199[0.2.2]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.1...v0.2.2
200[0.2.1]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.2.0...v0.2.1
201[0.2.0]: https://github.com/RazrFalcon/memmap2-rs/compare/v0.1.0...v0.2.0
202