Sha256: 535ed84250cfe8f176494eba226d1c1df9687b5c30cf52d5949f56a591947656

Contents?: true

Size: 340 Bytes

Versions: 8

Compression:

Stored size: 340 Bytes

Contents

//! Implementation for Fuchsia Zircon
use crate::Error;
use core::mem::MaybeUninit;

#[link(name = "zircon")]
extern "C" {
    fn zx_cprng_draw(buffer: *mut u8, length: usize);
}

pub fn getrandom_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
    unsafe { zx_cprng_draw(dest.as_mut_ptr() as *mut u8, dest.len()) }
    Ok(())
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs
wasmtime-28.0.0 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs
wasmtime-27.0.0 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs
wasmtime-26.0.0 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs
wasmtime-25.0.2 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs
wasmtime-25.0.1 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs
wasmtime-25.0.0 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs
wasmtime-24.0.0 ./ext/cargo-vendor/getrandom-0.2.15/src/fuchsia.rs