/morello-capability-rs

Library to interact with Morello Capabilities through Rust

Primary LanguageRustMIT LicenseMIT

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);
}