include_bytes_aligned 0.1.2

A simple macro that embeds the bytes of an external file into the executable and guarantees that they are aligned.
Documentation
1
2
3
4
5
6
7
8
9
10
use include_bytes_aligned::include_bytes_aligned;

#[test]
fn first() {
    let data: &'static [u8] = include_bytes_aligned!(256, "tests.rs");

    let ptr = data as *const _ as *const ();

    assert_eq!(ptr as usize % 256, 0);
}