File tree 3 files changed +32
-0
lines changed
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ appveyor = { repository = "rust-random/getrandom" }
16
16
17
17
[workspace ]
18
18
members = [
19
+ " custom/dummy" ,
19
20
]
20
21
21
22
[dependencies ]
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " getrandom-dummy"
3
+ version = " 0.1.0"
4
+ edition = " 2018"
5
+ authors = [" The Rand Project Developers" ]
6
+ license = " MIT OR Apache-2.0"
7
+ description = " Dummy implementation for using getrandom on all unsupported targets"
8
+ documentation = " https://docs.rs/getrandom-dummy"
9
+ repository = " https://github.com/rust-random/getrandom/tree/master/custom/dummy"
10
+
11
+ [lib ]
12
+ crate-type = [" dylib" ]
13
+
14
+ [dependencies ]
15
+ getrandom = { path = " ../.." , features = [" custom" ] }
Original file line number Diff line number Diff line change
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
+
9
+ //! `getrandom` dummy implementation for all unsupported targets
10
+ use getrandom:: { register_custom_getrandom, Error } ;
11
+
12
+ register_custom_getrandom ! ( getrandom_inner) ;
13
+
14
+ fn getrandom_inner ( _dest : & mut [ u8 ] ) -> Result < ( ) , Error > {
15
+ Err ( Error :: UNSUPPORTED )
16
+ }
You can’t perform that action at this time.
0 commit comments