editres

Crates.ioeditres
lib.rseditres
version0.1.6
sourcesrc
created_at2024-01-11 16:43:01.159359
updated_at2024-01-27 08:43:13.288085
descriptionEmbed data into executables after build
homepagehttps://github.com/branchseer/editres
repositoryhttps://github.com/branchseer/editres
max_upload_size
id1096502
size34,187
BranchSeer (branchseer)

documentation

README

editres

crates.io

Embed data into executables after build.

Documentation

Supported Executable Formats

  • Windows (PE)
  • Linux (ELF)
  • macOS (Mach-O)

Quick Start

1. Declare resources using editres::resource!

use editres::resource;
use std::str::from_utf8;

# fn main() {
let res = resource!("my_res"); // Option<&'static [u8]>
if let Some(res) = res {
    println!("{}", from_utf8(res).unwrap());
} else {
    println!("my_res is not injected yet");
}
# }

2. Inject data in the executable

You can inject data in executables using library editres or command line from editres_cli.

  • Library usage:
    1. Add editres as a dependency with feature injector enabled,
    2. Refer to injector::inject.
  • Command line usage:
    1. cargo install editres_cli, or download from the releases.
    2. Get command line help using editres help inject

Notes

editres is based on Node.js' single executable application implementation: postject.

Commit count: 0

cargo fmt