| Crates.io | embed-rust |
| lib.rs | embed-rust |
| version | 0.4.0 |
| created_at | 2023-08-01 16:45:40.729303+00 |
| updated_at | 2025-07-04 19:19:19.480283+00 |
| description | A macro that allows to embed a Rust executable. |
| homepage | |
| repository | https://github.com/Abestanis/embed-rust |
| max_upload_size | |
| id | 932027 |
| size | 49,493 |
A macro that allows to embed a Rust executable in another Rust program. This can be useful for building small test payloads for other (e.g. embedded) targets.
Requires Rust 1.88 or later.
const BASIC_EXAMPLE: &[u8] = embed_rust!({
source: {
fn main() {
println!("Hello world!");
}
},
});
For more examples see the tests directory.