shed

Crates.ioshed
lib.rsshed
version1.0.0
sourcesrc
created_at2017-11-19 14:54:46.879983
updated_at2021-06-24 07:22:06.209292
descriptionA portable key-value store which is appended to the end of an executable file
homepage
repositoryhttps://github.com/Asriel/SHED
max_upload_size
id39904
size21,649
Asriel (Asriel)

documentation

https://docs.rs/shed

README

SHED: Self Hosted Executable Database

A portable key-value store which is appended to the end of an executable file. Currently only working with ELF Executables.

Example Code

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

To Do

  • Get fully working on Linux
  • Add support for Windows PE executables
  • Make API look nicer
  • Write some documentation

Warning

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.

Commit count: 5

cargo fmt