Crates.io | shed |
lib.rs | shed |
version | 1.0.0 |
source | src |
created_at | 2017-11-19 14:54:46.879983 |
updated_at | 2021-06-24 07:22:06.209292 |
description | A portable key-value store which is appended to the end of an executable file |
homepage | |
repository | https://github.com/Asriel/SHED |
max_upload_size | |
id | 39904 |
size | 21,649 |
A portable key-value store which is appended to the end of an executable file. Currently only working with ELF Executables.
// Create a new SHED
let mut shed_example = shed::Shed::new();
// Test wheather this executable already has a SHED
if !shed_example.shed_exists() {
shed_example
.initialize_shed()
.expect("Failed to initialize SHED");
}
// Create a key value store with the value type String
let mut x = shed::Store::new();
x.insert(String::from("Test Key"), String::from("Test Value"));
// Write our key store to the SHED
shed_example
.write_shed(x)
.expect("Failed to write data to SHED");
// Read key value store from SHED
let read_shed: shed::Store<String> =
shed_example.read_shed().expect("Failed to read from SHED");
println!("{:?}", read_shed);
This crate is experimental, since it involves an executable file modifying itself it may or may not trigger antivirus products. So far it hasn't triggered any of the major antivirus products so it should be good to use.