embeddy

Crates.ioembeddy
lib.rsembeddy
version0.1.1
sourcesrc
created_at2023-04-25 05:26:47.850571
updated_at2023-04-28 22:54:53.313599
descriptionResource embedding
homepage
repositoryhttps://github.com/jacobtread/embeddy
max_upload_size
id848237
size4,369
Jacob (jacobtread)

documentation

README

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");
}
Commit count: 7

cargo fmt