1 unstable release

0.1.0 Apr 28, 2023

#77 in #embedding

31 downloads per month
Used in embeddy

MIT license

5KB
62 lines

Embeddy

License Cargo Version Cargo Downloads

Minimal opinionated resource embedding

Files are loaded relative to the Cargo.toml file

Example Usage

use embeddy::Embedded;

/// Contains all the files stored in the "test" folder 
/// use the [`Embedded::get`] method to access the folders
#[derive(Embedded)]
#[folder = "test"]
struct MyResources;

fn main() {
    let file: Option<&'static [u8]> = MyResources::get("test.txt");
    let nested_file: Option<&'static [u8]> = MyResources::get("sub/test.txt");
}

Dependencies

~0.4–1MB
~20K SLoC