#sgx-sdk #intel-sgx #rand #applications #derive #write #ability

macro sgx_rand_derive

Rust SGX SDK provides the ability to write Intel SGX applications in Rust Programming Language

10 stable releases

1.1.1 Apr 2, 2020
1.1.0 Dec 19, 2019
1.0.9 Sep 16, 2019
1.0.8 Jun 11, 2019
0.9.8 Mar 27, 2018

#22 in #ability

26 downloads per month

Custom license

7KB
86 lines

Note

Please visit our homepage for usage. Thanks!


lib.rs:

Support for #[derive(Rand)]

Note

TcsPolicy must be Bound.

Examples

extern crate sgx_rand;
#[macro_use]
extern crate sgx_rand_derive;

#[derive(Rand, Debug)]
struct MyStruct {
    a: i32,
    b: u32,
}

fn main() {
    println!("{:?}", sgx_rand::random::<MyStruct>());
}

Dependencies

~1.5MB
~41K SLoC