Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 555 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 555 Bytes

Capabilitiy FFI

Compiling

You will need to specify the location of the Morello linker. Our Morello Rust compiler comes with a wrapper script for Morello Clang which will call the linker. Modify .cargo/config.toml, substituting the path appropriately:

[target.aarch64-unknown-freebsd-purecap]
linker = "/path/to/morello-rust/clang-morello.sh"

Basic use

extern crate morello_capability_rs;

fn main() {
    let mut i : i32 = 0;
    let addr = morello_capability_rs::get_address(&mut i);
    println!("0x{:x}", addr);
}