embed-rust

Crates.ioembed-rust
lib.rsembed-rust
version0.4.0
created_at2023-08-01 16:45:40.729303+00
updated_at2025-07-04 19:19:19.480283+00
descriptionA macro that allows to embed a Rust executable.
homepage
repositoryhttps://github.com/Abestanis/embed-rust
max_upload_size
id932027
size49,493
(Abestanis)

documentation

README

Embed Rust

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.

Example

const BASIC_EXAMPLE: &[u8] = embed_rust!({
    source: {
        fn main() {
            println!("Hello world!");
        }
    },
});

For more examples see the tests directory.

Commit count: 29

cargo fmt