#enclave #binary #configuration

nightly macro binary_enclave_macro

macro crate for binary_enclave

2 releases

0.1.1 Jan 23, 2021
0.1.0 Jun 26, 2020

#35 in #enclave


Used in binary_enclave

MIT license

4KB
55 lines

Binary Enclave

Latest Version License


Binary Enclave allows storing configuration data in a binary directly. You will probably never find a good reason for doing this. This is primarily an exercise for learning rust and something I found interesting. The idea originates from the Wraith Botpack https://github.com/wraith/wraith.

Caveats

  • Written payload is only visible upon next execution.

Basic Usage

use binary_enclave::{enclave, Enclave}

#[enclave(appconfig)]
pub static CONFIG: Enclave<Config, 512> = Enclave::new();

fn main() {
    let conf = CONFIG.decode()?;
    let res = CONFIG.write(&Config{ some: 43, values: "see" })?;
}

Outstanding Items

  • PE (Windows) support
  • Payload Encryption
  • Github Actions

lib.rs:

Macro crate for binary_enclave.

Dependencies

~1.5MB
~37K SLoC