include-flate
include-flate copied to clipboard
A variant of include_bytes!/include_str! with compile-time deflation and runtime lazy inflation
First off, thank you for the great crate! I'm now generating some plaintext in `build.rs` to `$OUT_DIR/foo.txt`, and including it in the library code like `include_str!(concat!(env!("OUT_DIR"), "/foo.txt"))`. It'd be great...
I really like it when READMEs show how to properly use a project to quickly get a feel for it. I think it would make the project more approachable in...
This PR introduces conditional compression `deflate_if` as @SOF3 pointed out in [previous PR](https://github.com/SOF3/include-flate/pull/25#issuecomment-1786329977). ```rust flate!(pub static DATA1: [u8] from "assets/random.dat" with zstd if always); flate!(pub static DATA2: [u8] from "assets/random.dat"...
Fixes #19
So we can implement lexer and parser automaton compression according to [here](https://github.com/cenotelie/hime/issues/85)
This means we can include files from `OUT_DIR` which is useful for dynamic file generation (I need to merge several folders into one place). Using relative path is simply not...
The `include-flate` crate is great and would be super useful for WASM apps and libraries. It would be a way to include data files that WASM couldn't otherwise upload. It's...
`LazyLock` is being stabilized in the Rust standard library with 1.80, releasing July 25th. The `once_cell` dependency can be removed in favor of it. https://github.com/rust-lang/rust/pull/121377