mirror of
https://github.com/RGBCube/embd-rs
synced 2025-07-27 05:27:44 +00:00
Todo dirs
This commit is contained in:
parent
d262e42422
commit
c031e19e7f
15 changed files with 371 additions and 179 deletions
|
@ -4,13 +4,16 @@ A super simple file and directory embedding crate,
|
|||
that loads files from the filesystem in debug mode,
|
||||
allowing for quick edit-and-test cycles without compilation.
|
||||
|
||||
On release mode it falls back to `include_str!`, `include_bytes!` and `include_dir!`.
|
||||
On release mode it falls back to `include_str!`, `include_bytes!`
|
||||
and our own custom `include_dir!` implementation.
|
||||
|
||||
## Usage
|
||||
|
||||
```rs
|
||||
let contents: Cow<'_, str> = embed::string!("path/to/file.txt");
|
||||
let bytes: Cow<'_, [u8]> = embed::bytes!("path/to/image.png");
|
||||
|
||||
let dir: embed::Dir = embed::dir!("path/to");
|
||||
```
|
||||
|
||||
## License
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue