3 ms·
rust-embed is one: https://docs.rs/rust-embed/5.9.0/rust_embed/trait.RustEmbed.html https://docs.rs/rust-embed/5.9.0/rust_embed/trait.RustEmbed.... This macro
by tangent128 5y ago
rust-embed is one: https://docs.rs/rust-embed/5.9.0/rust_embed/trait.RustEmbed.html https://docs.rs/rust-embed/5.9.0/rust_embed/trait.RustEmbed....
This macro lets you embed an entire folder of assets in your binary at compile time, to simplify distribution.
Taking the concept further, I could also imagine build macros that compile Typescript or SASS files at build time, or generate data structures from a Protocol Buffers definition file, or in general operations that ingest non-Rust source code and use tools outside the repository.
- vlovich123 5y agoSure. I would expect such a tool to be happy enough with sandboxing to the folder containing the source of the project and the build folder, no?