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