alnyan/yggdrasil: use std instead of yggdrasil-rt
This commit is contained in:
parent
69a646b970
commit
0c156352b5
@ -23,9 +23,6 @@ libc = { version = "0.2.149", default-features = false }
|
|||||||
[target.'cfg(target_os = "wasi")'.dependencies]
|
[target.'cfg(target_os = "wasi")'.dependencies]
|
||||||
wasi = { version = "0.11", default-features = false }
|
wasi = { version = "0.11", default-features = false }
|
||||||
|
|
||||||
[target.'cfg(target_os = "yggdrasil")'.dependencies]
|
|
||||||
yggdrasil-rt = { git = "https://git.alnyan.me/yggdrasil/yggdrasil-rt.git" }
|
|
||||||
|
|
||||||
[target.'cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))'.dependencies]
|
[target.'cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))'.dependencies]
|
||||||
wasm-bindgen = { version = "0.2.62", default-features = false, optional = true }
|
wasm-bindgen = { version = "0.2.62", default-features = false, optional = true }
|
||||||
js-sys = { version = "0.3", optional = true }
|
js-sys = { version = "0.3", optional = true }
|
||||||
|
@ -188,7 +188,8 @@
|
|||||||
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
|
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "https://docs.rs/getrandom/0.2.12"
|
html_root_url = "https://docs.rs/getrandom/0.2.12"
|
||||||
)]
|
)]
|
||||||
#![no_std]
|
#![cfg_attr(not(target_os = "yggdrasil"), no_std)]
|
||||||
|
#![cfg_attr(target_os = "yggdrasil", feature(yggdrasil_os))]
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes, missing_docs)]
|
#![warn(rust_2018_idioms, unused_lifetimes, missing_docs)]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
|
|
||||||
|
@ -3,5 +3,5 @@ use core::mem::MaybeUninit;
|
|||||||
use crate::Error;
|
use crate::Error;
|
||||||
|
|
||||||
pub(crate) fn getrandom_inner(buffer: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
|
pub(crate) fn getrandom_inner(buffer: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
|
||||||
Ok(unsafe { yggdrasil_rt::sys::get_random(crate::util::slice_assume_init_mut(buffer)) })
|
Ok(std::os::yggdrasil::get_random(buffer))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user