imbolc / embed-file

Embeds files content into the binary in release mode, but loads it from the fs in debug

Repository from Github https://github.comimbolc/embed-fileRepository from Github https://github.comimbolc/embed-file

License Crates.io Docs.rs

embed-file

A simplified version of rust-embed for single files instead of folders. Embeds files content into the binary in release mode, but loads it from the fs in debug.

The goal of is to avoid unnecessary recompilations when an included by e.g. [include_str] file change.

Usage

let my_string = embed_file::embed_string!("path/to/my-text.txt");
let my_image = embed_file::embed_bytes!("path/to/my-image.jpg");

Contributing

  • please run .pre-commit.sh before sending a PR, it will check everything

License

This project is licensed under the MIT license.

About

Embeds files content into the binary in release mode, but loads it from the fs in debug

License:MIT License


Languages

Language:Rust 77.7%Language:Shell 22.3%