Crates.io | binary_enclave |
lib.rs | binary_enclave |
version | 0.1.1 |
source | src |
created_at | 2020-06-26 06:28:04.616179 |
updated_at | 2021-01-23 06:13:51.226701 |
description | embed modifiable configuration or other data within a binary directly |
homepage | https://github.com/zacheryph/binary_enclave |
repository | https://github.com/zacheryph/binary_enclave |
max_upload_size | |
id | 258309 |
size | 16,472 |
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].
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" })?;
}