embed-file 0.2.0

Embeds files content into the binary in release mode, but loads it from the fs in debug
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented3 out of 3 items with examples
  • Size
  • Source code size: 10.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • imbolc/embed-file
    3 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • imbolc

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.