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