embeddy-derive

Crates.ioembeddy-derive
lib.rsembeddy-derive
version0.1.0
sourcesrc
created_at2023-04-28 22:54:36.814028
updated_at2023-04-28 22:54:36.814028
descriptionResource embedding derive macro
homepage
repositoryhttps://github.com/jacobtread/embeddy
max_upload_size
id851744
size4,735
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