1# Changelog 2All notable changes to this project will be documented in this file. 3 4The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 5and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 7## [0.2.12] - 2024-01-09 8### Fixed 9- Custom backend for targets without atomics [#385] 10 11### Changed 12- Improve robustness of the Hermit backend and `sys_fill_exact` [#386] 13- Raise minimum supported Apple OS versions to macOS 10.12 and iOS 10 [#388] 14 15### Added 16- Document platform support policy [#387] 17 18[#385]: https://github.com/rust-random/getrandom/pull/385 19[#386]: https://github.com/rust-random/getrandom/pull/386 20[#387]: https://github.com/rust-random/getrandom/pull/387 21[#388]: https://github.com/rust-random/getrandom/pull/388 22 23## [0.2.11] - 2023-11-08 24### Added 25- GNU/Hurd support [#370] 26 27### Changed 28- Renamed `__getrandom_internal` to `__GETRANDOM_INTERNAL` [#369] 29- Updated link to Hermit docs [#374] 30 31[#369]: https://github.com/rust-random/getrandom/pull/369 32[#370]: https://github.com/rust-random/getrandom/pull/370 33[#374]: https://github.com/rust-random/getrandom/pull/374 34 35## [0.2.10] - 2023-06-06 36### Added 37- Support for PS Vita (`armv7-sony-vita-newlibeabihf`) [#359] 38 39### Changed 40- Use getentropy from libc on Emscripten targets [#362] 41 42[#359]: https://github.com/rust-random/getrandom/pull/359 43[#362]: https://github.com/rust-random/getrandom/pull/362 44 45## [0.2.9] - 2023-04-06 46### Added 47- AIX support [#282] 48- `getrandom_uninit` function [#291] 49- `wasm64-unknown-unknown` support [#303] 50- tvOS and watchOS support [#317] 51- QNX/nto support [#325] 52- Support for `getrandom` syscall on NetBSD ≥ 10.0 [#331] 53- `RtlGenRandom` fallback for non-UWP Windows [#337] 54 55### Breaking Changes 56- Update MSRV to 1.36 [#291] 57 58### Fixed 59- Solaris/OpenBSD/Dragonfly build [#301] 60 61### Changed 62- Update MSRV to 1.36 [#291] 63- Use getentropy on Emscripten [#307] 64- Solaris: consistantly use `/dev/random` source [#310] 65- Move 3ds selection above rdrand/js/custom fallback [#312] 66- Remove buffer zeroing from Node.js implementation [#315] 67- Use `open` instead of `open64` [#326] 68- Remove #cfg from bsd_arandom.rs [#332] 69- Hermit: use `sys_read_entropy` syscall [#333] 70- Eliminate potential panic in sys_fill_exact [#334] 71- rdrand: Remove checking for 0 and !0 and instead check CPU family and do a self-test [#335] 72- Move `__getrandom_custom` definition into a const block [#344] 73- Switch the custom backend to Rust ABI [#347] 74 75[#282]: https://github.com/rust-random/getrandom/pull/282 76[#291]: https://github.com/rust-random/getrandom/pull/291 77[#301]: https://github.com/rust-random/getrandom/pull/301 78[#303]: https://github.com/rust-random/getrandom/pull/303 79[#307]: https://github.com/rust-random/getrandom/pull/307 80[#310]: https://github.com/rust-random/getrandom/pull/310 81[#312]: https://github.com/rust-random/getrandom/pull/312 82[#315]: https://github.com/rust-random/getrandom/pull/315 83[#317]: https://github.com/rust-random/getrandom/pull/317 84[#325]: https://github.com/rust-random/getrandom/pull/325 85[#326]: https://github.com/rust-random/getrandom/pull/326 86[#331]: https://github.com/rust-random/getrandom/pull/331 87[#332]: https://github.com/rust-random/getrandom/pull/332 88[#333]: https://github.com/rust-random/getrandom/pull/333 89[#334]: https://github.com/rust-random/getrandom/pull/334 90[#335]: https://github.com/rust-random/getrandom/pull/335 91[#337]: https://github.com/rust-random/getrandom/pull/337 92[#344]: https://github.com/rust-random/getrandom/pull/344 93[#347]: https://github.com/rust-random/getrandom/pull/347 94 95## [0.2.8] - 2022-10-20 96### Changed 97- The [Web Cryptography API] will now be preferred on `wasm32-unknown-unknown` 98 when using the `"js"` feature, even on Node.js [#284] [#295] 99 100### Added 101- Added benchmarks to track buffer initialization cost [#272] 102 103### Fixed 104- Use `$crate` in `register_custom_getrandom!` [#270] 105 106### Documentation 107- Add information about enabling `"js"` feature [#280] 108- Fix link to `wasm-bindgen` [#278] 109- Document the varied implementations for underlying randomness sources [#276] 110 111[Web Cryptography API]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API 112[#284]: https://github.com/rust-random/getrandom/pull/284 113[#295]: https://github.com/rust-random/getrandom/pull/295 114[#272]: https://github.com/rust-random/getrandom/pull/272 115[#270]: https://github.com/rust-random/getrandom/pull/270 116[#280]: https://github.com/rust-random/getrandom/pull/280 117[#278]: https://github.com/rust-random/getrandom/pull/278 118[#276]: https://github.com/rust-random/getrandom/pull/276 119 120## [0.2.7] - 2022-06-14 121### Changed 122- Update `wasi` dependency to `0.11` [#253] 123 124### Fixed 125- Use `AtomicPtr` instead of `AtomicUsize` for Strict Provenance compatibility. [#263] 126 127### Documentation 128- Add comments explaining use of fallback mechanisms [#257] [#260] 129 130[#263]: https://github.com/rust-random/getrandom/pull/263 131[#260]: https://github.com/rust-random/getrandom/pull/260 132[#253]: https://github.com/rust-random/getrandom/pull/253 133[#257]: https://github.com/rust-random/getrandom/pull/257 134 135## [0.2.6] - 2022-03-28 136### Added 137- Nintendo 3DS (`armv6k-nintendo-3ds`) support [#248] 138 139### Changed 140- Retry `open` when interrupted [#252] 141 142[#248]: https://github.com/rust-random/getrandom/pull/248 143[#252]: https://github.com/rust-random/getrandom/pull/252 144 145## [0.2.5] - 2022-02-22 146### Added 147- ESP-IDF targets (`*‑espidf`) support [#245] 148 149### Fixed 150- Webpack warning caused by dynamic require [#234] 151- Error checking on iOS for `SecRandomCopyBytes` [#244] 152 153[#234]: https://github.com/rust-random/getrandom/pull/234 154[#244]: https://github.com/rust-random/getrandom/pull/244 155[#245]: https://github.com/rust-random/getrandom/pull/245 156 157## [0.2.4] - 2021-12-13 158### Changed 159- Use explicit imports in the `js` backend [#220] 160- Use `/dev/urandom` on Redox instead of `rand:` [#222] 161- Use `NonZeroU32::new_unchecked` to convert wasi error [#233] 162 163### Added 164- SOLID targets (`*-kmc-solid_*`) support [#235] 165- Limited Hermit (`x86_64-unknown-hermit`) support [#236] 166 167[#220]: https://github.com/rust-random/getrandom/pull/220 168[#222]: https://github.com/rust-random/getrandom/pull/222 169[#233]: https://github.com/rust-random/getrandom/pull/233 170[#235]: https://github.com/rust-random/getrandom/pull/235 171[#236]: https://github.com/rust-random/getrandom/pull/236 172 173## [0.2.3] - 2021-04-10 174### Changed 175- Replace build.rs with link attributes. [#205] 176- Add support for getrandom syscall on DragonFly BSD. [#210] 177- Improve Node.js detection. [#215] 178 179[#205]: https://github.com/rust-random/getrandom/pull/205 180[#210]: https://github.com/rust-random/getrandom/pull/210 181[#215]: https://github.com/rust-random/getrandom/pull/215 182 183## [0.2.2] - 2021-01-19 184### Changed 185- Forward `rustc-dep-of-std` to dependencies. [#198] 186- Highlight feature-dependent functionality in documentation using the `doc_cfg` feature. [#200] 187 188[#198]: https://github.com/rust-random/getrandom/pull/198 189[#200]: https://github.com/rust-random/getrandom/pull/200 190 191## [0.2.1] - 2021-01-03 192### Changed 193- Update `cfg-if` to v1.0. [#166] 194- Update `wasi` to v0.10. [#167] 195 196### Fixed 197- Multithreaded WASM support. [#165] 198 199### Removed 200- Windows XP support. [#177] 201- Direct `stdweb` support. [#178] 202- CloudABI support. [#184] 203 204[#165]: https://github.com/rust-random/getrandom/pull/165 205[#166]: https://github.com/rust-random/getrandom/pull/166 206[#167]: https://github.com/rust-random/getrandom/pull/167 207[#177]: https://github.com/rust-random/getrandom/pull/177 208[#178]: https://github.com/rust-random/getrandom/pull/178 209[#184]: https://github.com/rust-random/getrandom/pull/184 210 211## [0.2.0] - 2020-09-10 212### Features for using getrandom on unsupported targets 213 214The following (off by default) Cargo features have been added: 215- `"rdrand"` - use the RDRAND instruction on `no_std` `x86`/`x86_64` targets [#133] 216- `"js"` - use JavaScript calls on `wasm32-unknown-unknown` [#149] 217 - Replaces the `stdweb` and `wasm-bindgen` features (which are removed) 218- `"custom"` - allows a user to specify a custom implementation [#109] 219 220### Breaking Changes 221- Unsupported targets no longer compile [#107] 222- Change/Add `Error` constants [#120] 223- Only impl `std` traits when the `"std"` Cargo feature is specified [#106] 224- Remove official support for Hermit, L4Re, and UEFI [#133] 225- Remove optional `"log"` dependency [#131] 226- Update minimum supported Linux kernel to 2.6.32 [#153] 227- Update MSRV to 1.34 [#159] 228 229[#106]: https://github.com/rust-random/getrandom/pull/106 230[#107]: https://github.com/rust-random/getrandom/pull/107 231[#109]: https://github.com/rust-random/getrandom/pull/109 232[#120]: https://github.com/rust-random/getrandom/pull/120 233[#131]: https://github.com/rust-random/getrandom/pull/131 234[#133]: https://github.com/rust-random/getrandom/pull/133 235[#149]: https://github.com/rust-random/getrandom/pull/149 236[#153]: https://github.com/rust-random/getrandom/pull/153 237[#159]: https://github.com/rust-random/getrandom/pull/159 238 239## [0.1.16] - 2020-12-31 240### Changed 241- Update `cfg-if` to v1.0. [#173] 242- Implement `std::error::Error` for the `Error` type on additional targets. [#169] 243 244### Fixed 245- Multithreaded WASM support. [#171] 246 247[#173]: https://github.com/rust-random/getrandom/pull/173 248[#171]: https://github.com/rust-random/getrandom/pull/171 249[#169]: https://github.com/rust-random/getrandom/pull/169 250 251## [0.1.15] - 2020-09-10 252### Changed 253- Added support for Internet Explorer 11 [#139] 254- Fix Webpack require warning with `wasm-bindgen` [#137] 255 256[#137]: https://github.com/rust-random/getrandom/pull/137 257[#139]: https://github.com/rust-random/getrandom/pull/139 258 259## [0.1.14] - 2020-01-07 260### Changed 261- Remove use of spin-locks in the `use_file` module. [#125] 262- Update `wasi` to v0.9. [#126] 263- Do not read errno value on DragonFlyBSD to fix compilation failure. [#129] 264 265[#125]: https://github.com/rust-random/getrandom/pull/125 266[#126]: https://github.com/rust-random/getrandom/pull/126 267[#129]: https://github.com/rust-random/getrandom/pull/129 268 269## [0.1.13] - 2019-08-25 270### Added 271- VxWorks targets support. [#86] 272 273### Changed 274- If zero-length slice is passed to the `getrandom` function, always return 275`Ok(())` immediately without doing any calls to the underlying operating 276system. [#104] 277- Use the `kern.arandom` sysctl on NetBSD. [#115] 278 279### Fixed 280- Bump `cfg-if` minimum version from 0.1.0 to 0.1.2. [#112] 281- Typos and bad doc links. [#117] 282 283[#86]: https://github.com/rust-random/getrandom/pull/86 284[#104]: https://github.com/rust-random/getrandom/pull/104 285[#112]: https://github.com/rust-random/getrandom/pull/112 286[#115]: https://github.com/rust-random/getrandom/pull/115 287[#117]: https://github.com/rust-random/getrandom/pull/117 288 289## [0.1.12] - 2019-08-18 290### Changed 291- Update wasi dependency from v0.5 to v0.7. [#100] 292 293[#100]: https://github.com/rust-random/getrandom/pull/100 294 295## [0.1.11] - 2019-08-25 296### Fixed 297- Implement `std`-dependent traits for selected targets even if `std` 298feature is disabled. (backward compatibility with v0.1.8) [#96] 299 300[#96]: https://github.com/rust-random/getrandom/pull/96 301 302## [0.1.10] - 2019-08-18 [YANKED] 303### Changed 304- Use the dummy implementation on `wasm32-unknown-unknown` even with the 305disabled `dummy` feature. [#90] 306 307### Fixed 308- Fix CSP error for `wasm-bindgen`. [#92] 309 310[#90]: https://github.com/rust-random/getrandom/pull/90 311[#92]: https://github.com/rust-random/getrandom/pull/92 312 313## [0.1.9] - 2019-08-14 [YANKED] 314### Changed 315- Remove `std` dependency for opening and reading files. [#58] 316- Use `wasi` instead of `libc` on WASI target. [#64] 317- By default emit a compile-time error when built for an unsupported target. 318This behaviour can be disabled by using the `dummy` feature. [#71] 319 320### Added 321- Add support for UWP targets. [#69] 322- Add unstable `rustc-dep-of-std` feature. [#78] 323 324[#58]: https://github.com/rust-random/getrandom/pull/58 325[#64]: https://github.com/rust-random/getrandom/pull/64 326[#69]: https://github.com/rust-random/getrandom/pull/69 327[#71]: https://github.com/rust-random/getrandom/pull/71 328[#78]: https://github.com/rust-random/getrandom/pull/78 329 330## [0.1.8] - 2019-07-29 331### Changed 332- Explicitly specify types to arguments of 'libc::syscall'. [#74] 333 334[#74]: https://github.com/rust-random/getrandom/pull/74 335 336## [0.1.7] - 2019-07-29 337### Added 338- Support for hermit and l4re. [#61] 339- `Error::raw_os_error` method, `Error::INTERNAL_START` and 340`Error::CUSTOM_START` constants. Use `libc` for retrieving OS error descriptions. [#54] 341 342### Changed 343- Remove `lazy_static` dependency and use custom structures for lock-free 344initialization. [#51] [#52] 345- Try `getrandom()` first on FreeBSD. [#57] 346 347### Removed 348- Bitrig support. [#56] 349 350### Deprecated 351- `Error::UNKNOWN`, `Error::UNAVAILABLE`. [#54] 352 353[#51]: https://github.com/rust-random/getrandom/pull/51 354[#52]: https://github.com/rust-random/getrandom/pull/52 355[#54]: https://github.com/rust-random/getrandom/pull/54 356[#56]: https://github.com/rust-random/getrandom/pull/56 357[#57]: https://github.com/rust-random/getrandom/pull/57 358[#61]: https://github.com/rust-random/getrandom/pull/61 359 360## [0.1.6] - 2019-06-30 361### Changed 362- Minor change of RDRAND AMD bug handling. [#48] 363 364[#48]: https://github.com/rust-random/getrandom/pull/48 365 366## [0.1.5] - 2019-06-29 367### Fixed 368- Use shared `File` instead of shared file descriptor. [#44] 369- Workaround for RDRAND hardware bug present on some AMD CPUs. [#43] 370 371### Changed 372- Try `getentropy` and then fallback to `/dev/random` on macOS. [#38] 373 374[#38]: https://github.com/rust-random/getrandom/issues/38 375[#43]: https://github.com/rust-random/getrandom/pull/43 376[#44]: https://github.com/rust-random/getrandom/issues/44 377 378## [0.1.4] - 2019-06-28 379### Added 380- Add support for `x86_64-unknown-uefi` target by using RDRAND with CPUID 381feature detection. [#30] 382 383### Fixed 384- Fix long buffer issues on Windows and Linux. [#31] [#32] 385- Check `EPERM` in addition to `ENOSYS` on Linux. [#37] 386 387### Changed 388- Improve efficiency by sharing file descriptor across threads. [#13] 389- Remove `cloudabi`, `winapi`, and `fuchsia-cprng` dependencies. [#40] 390- Improve RDRAND implementation. [#24] 391- Don't block during syscall detection on Linux. [#26] 392- Increase consistency with libc implementation on FreeBSD. [#36] 393- Apply `rustfmt`. [#39] 394 395[#30]: https://github.com/rust-random/getrandom/pull/30 396[#13]: https://github.com/rust-random/getrandom/issues/13 397[#40]: https://github.com/rust-random/getrandom/pull/40 398[#26]: https://github.com/rust-random/getrandom/pull/26 399[#24]: https://github.com/rust-random/getrandom/pull/24 400[#39]: https://github.com/rust-random/getrandom/pull/39 401[#36]: https://github.com/rust-random/getrandom/pull/36 402[#31]: https://github.com/rust-random/getrandom/issues/31 403[#32]: https://github.com/rust-random/getrandom/issues/32 404[#37]: https://github.com/rust-random/getrandom/issues/37 405 406## [0.1.3] - 2019-05-15 407- Update for `wasm32-unknown-wasi` being renamed to `wasm32-wasi`, and for 408 WASI being categorized as an OS. 409 410## [0.1.2] - 2019-04-06 411- Add support for `wasm32-unknown-wasi` target. 412 413## [0.1.1] - 2019-04-05 414- Enable std functionality for CloudABI by default. 415 416## [0.1.0] - 2019-03-23 417Publish initial implementation. 418 419## [0.0.0] - 2019-01-19 420Publish an empty template library. 421 422[0.2.12]: https://github.com/rust-random/getrandom/compare/v0.2.11...v0.2.12 423[0.2.11]: https://github.com/rust-random/getrandom/compare/v0.2.10...v0.2.11 424[0.2.10]: https://github.com/rust-random/getrandom/compare/v0.2.9...v0.2.10 425[0.2.9]: https://github.com/rust-random/getrandom/compare/v0.2.8...v0.2.9 426[0.2.8]: https://github.com/rust-random/getrandom/compare/v0.2.7...v0.2.8 427[0.2.7]: https://github.com/rust-random/getrandom/compare/v0.2.6...v0.2.7 428[0.2.6]: https://github.com/rust-random/getrandom/compare/v0.2.5...v0.2.6 429[0.2.5]: https://github.com/rust-random/getrandom/compare/v0.2.4...v0.2.5 430[0.2.4]: https://github.com/rust-random/getrandom/compare/v0.2.3...v0.2.4 431[0.2.3]: https://github.com/rust-random/getrandom/compare/v0.2.2...v0.2.3 432[0.2.2]: https://github.com/rust-random/getrandom/compare/v0.2.1...v0.2.2 433[0.2.1]: https://github.com/rust-random/getrandom/compare/v0.2.0...v0.2.1 434[0.2.0]: https://github.com/rust-random/getrandom/compare/v0.1.15...v0.2.0 435[0.1.16]: https://github.com/rust-random/getrandom/compare/v0.1.15...v0.1.16 436[0.1.15]: https://github.com/rust-random/getrandom/compare/v0.1.14...v0.1.15 437[0.1.14]: https://github.com/rust-random/getrandom/compare/v0.1.13...v0.1.14 438[0.1.13]: https://github.com/rust-random/getrandom/compare/v0.1.12...v0.1.13 439[0.1.12]: https://github.com/rust-random/getrandom/compare/v0.1.11...v0.1.12 440[0.1.11]: https://github.com/rust-random/getrandom/compare/v0.1.10...v0.1.11 441[0.1.10]: https://github.com/rust-random/getrandom/compare/v0.1.9...v0.1.10 442[0.1.9]: https://github.com/rust-random/getrandom/compare/v0.1.8...v0.1.9 443[0.1.8]: https://github.com/rust-random/getrandom/compare/v0.1.7...v0.1.8 444[0.1.7]: https://github.com/rust-random/getrandom/compare/v0.1.6...v0.1.7 445[0.1.6]: https://github.com/rust-random/getrandom/compare/v0.1.5...v0.1.6 446[0.1.5]: https://github.com/rust-random/getrandom/compare/v0.1.4...v0.1.5 447[0.1.4]: https://github.com/rust-random/getrandom/compare/v0.1.3...v0.1.4 448[0.1.3]: https://github.com/rust-random/getrandom/compare/v0.1.2...v0.1.3 449[0.1.2]: https://github.com/rust-random/getrandom/compare/v0.1.1...v0.1.2 450[0.1.1]: https://github.com/rust-random/getrandom/compare/v0.1.0...v0.1.1 451[0.1.0]: https://github.com/rust-random/getrandom/compare/v0.0.0...v0.1.0 452[0.0.0]: https://github.com/rust-random/getrandom/releases/tag/v0.0.0 453