mc-sgx-capable-sys-types 0.12.0

FFI type definitions used by the `sgx_capable` library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2022-2024 The MobileCoin Foundation

//! Builds the FFI type bindings for the types used by libsgx_capable.{so,a}.

use mc_sgx_core_build::SgxParseCallbacks;

fn main() {
    let callback = SgxParseCallbacks::default().enum_types(["sgx_device_status_t"]);

    mc_sgx_core_build::sgx_builder()
        .header("wrapper.h")
        .allowlist_type("_sgx_device_status_t")
        .parse_callbacks(Box::new(callback))
        .generate()
        .expect("Unable to generate bindings")
        .write_to_file(mc_sgx_core_build::build_output_dir().join("bindings.rs"))
        .expect("Couldn't write bindings!");
}