Skip to content

Commit f68a940

Browse files
authored
Release v0.2.12 (#389)
1 parent 5fe3c8e commit f68a940

30 files changed

+33
-202
lines changed

CHANGELOG.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.2.12] - 2024-01-09
8+
### Fixed
9+
- Custom backend for targets without atomics [#385]
810

911
### Changed
10-
- Raise minimum supported Apple OS versions to macOS 10.12 and iOS 10.
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
1122

1223
## [0.2.11] - 2023-11-08
1324
### Added
@@ -408,6 +419,7 @@ Publish initial implementation.
408419
## [0.0.0] - 2019-01-19
409420
Publish an empty template library.
410421

422+
[0.2.12]: https://github.com/rust-random/getrandom/compare/v0.2.11...v0.2.12
411423
[0.2.11]: https://github.com/rust-random/getrandom/compare/v0.2.10...v0.2.11
412424
[0.2.10]: https://github.com/rust-random/getrandom/compare/v0.2.9...v0.2.10
413425
[0.2.9]: https://github.com/rust-random/getrandom/compare/v0.2.8...v0.2.9

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "getrandom"
3-
version = "0.2.11" # Also update html_root_url in lib.rs when bumping this
3+
version = "0.2.12" # Also update html_root_url in lib.rs when bumping this
44
edition = "2018"
55
authors = ["The Rand Project Developers"]
66
license = "MIT OR Apache-2.0"

LICENSE-MIT

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2018 Developers of the Rand project
1+
Copyright (c) 2018-2024 The rust-random Project Developers
22
Copyright (c) 2014 The Rust Project Developers
33

44
Permission is hereby granted, free of charge, to any

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,20 @@ Additional targets may be supported using pluggable custom implementations.
6262
This means that as Rust drops support for old versions of operating systems (such as old Linux kernel versions, Android API levels, etc)
6363
in stable releases, `getrandom` may create new patch releases (`0.N.x`) that remove support for outdated platform versions.
6464

65-
# License
65+
## License
6666

6767
The `getrandom` library is distributed under either of
6868

69-
* [Apache License, Version 2.0](LICENSE-APACHE)
70-
* [MIT license](LICENSE-MIT)
69+
* [Apache License, Version 2.0][LICENSE-APACHE]
70+
* [MIT license][LICENSE-MIT]
7171

7272
at your option.
73+
74+
### Contribution
75+
76+
Unless you explicitly state otherwise, any contribution intentionally submitted
77+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
78+
dual licensed as above, without any additional terms or conditions.
79+
80+
[LICENSE-APACHE]: https://github.com/rust-random/getrandom/blob/master/LICENSE-APACHE
81+
[LICENSE-MIT]: https://github.com/rust-random/getrandom/blob/master/LICENSE-MIT

src/3ds.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2021 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for Nintendo 3DS
102
use crate::util_libc::sys_fill_exact;
113
use crate::Error;

src/apple-other.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2023 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for iOS, tvOS, and watchOS where `getentropy` is unavailable.
102
use crate::Error;
113
use core::{ffi::c_void, mem::MaybeUninit};

src/bsd_arandom.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for FreeBSD and NetBSD
102
use crate::{
113
util_libc::{sys_fill_exact, Weak},

src/custom.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! An implementation which calls out to an externally defined function.
102
use crate::{util::uninit_slice_fill_zero, Error};
113
use core::{mem::MaybeUninit, num::NonZeroU32};

src/dragonfly.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2021 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for DragonFly BSD
102
use crate::{
113
use_file,

src/error.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
81
use core::{fmt, num::NonZeroU32};
92

103
/// A small and `no_std` compatible error type

src/error_impls.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
81
#![cfg_attr(docsrs, doc(cfg(feature = "std")))]
92
extern crate std;
103

src/espidf.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2021 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for ESP-IDF
102
use crate::Error;
113
use core::{ffi::c_void, mem::MaybeUninit};

src/fuchsia.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for Fuchsia Zircon
102
use crate::Error;
113
use core::mem::MaybeUninit;

src/hermit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Implementation for Hermit
12
use crate::Error;
23
use core::{mem::MaybeUninit, num::NonZeroU32};
34

src/hurd.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2021 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for GNU/Hurd
102
use crate::util_libc::sys_fill_exact;
113
use crate::Error;

src/js.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
1+
//! Implementation for WASM based on Web and Node.js
82
use crate::Error;
93

104
extern crate std;

src/lib.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2019 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Interface to the operating system's random number generator.
102
//!
113
//! # Supported targets
@@ -194,7 +186,7 @@
194186
#![doc(
195187
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
196188
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
197-
html_root_url = "https://docs.rs/getrandom/0.2.11"
189+
html_root_url = "https://docs.rs/getrandom/0.2.12"
198190
)]
199191
#![no_std]
200192
#![warn(rust_2018_idioms, unused_lifetimes, missing_docs)]

src/linux_android.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for Linux / Android
102
use crate::{
113
lazy::LazyBool,

src/macos.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2023 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for macOS
102
use crate::{util_libc::last_os_error, Error};
113
use core::mem::MaybeUninit;

src/openbsd.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for OpenBSD
102
use crate::{util_libc::last_os_error, Error};
113
use core::mem::MaybeUninit;

src/rdrand.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
1+
//! RDRAND backend for x86(-64) targets
82
use crate::{lazy::LazyBool, util::slice_as_uninit, Error};
93
use core::mem::{size_of, MaybeUninit};
104

src/solaris_illumos.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for the Solaris family
102
//!
113
//! `/dev/random` uses the Hash_DRBG with SHA512 algorithm from NIST SP 800-90A.

src/solid.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2021 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for SOLID
102
use crate::Error;
113
use core::{mem::MaybeUninit, num::NonZeroU32};

src/use_file.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2023 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementations that just need to read from a file
102
use crate::{
113
util_libc::{open_readonly, sys_fill_exact},

src/util.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Copyright 2019 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
81
#![allow(dead_code)]
92
use core::{mem::MaybeUninit, ptr};
103

src/util_libc.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Copyright 2019 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
81
#![allow(dead_code)]
92
use crate::Error;
103
use core::{

src/vita.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2021 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for PS Vita
102
use crate::{util_libc::last_os_error, Error};
113
use core::mem::MaybeUninit;

src/vxworks.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for VxWorks
102
use crate::{util_libc::last_os_error, Error};
113
use core::{

src/wasi.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
91
//! Implementation for WASI
102
use crate::Error;
113
use core::{

src/windows.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
// Copyright 2018 Developers of the Rand project.
2-
//
3-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4-
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5-
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6-
// option. This file may not be copied, modified, or distributed
7-
// except according to those terms.
8-
1+
//! Implementation for Windows
92
use crate::Error;
103
use core::{ffi::c_void, mem::MaybeUninit, num::NonZeroU32, ptr};
114

0 commit comments

Comments
 (0)