unlit3dx_asset_bytes/lib.rs
1#![doc = include_str!("../README.md")]
2
3/// The soundfont the demo plays, embedded at build time by `build.rs`.
4///
5/// When the soundfont file is missing the build writes an empty stub, so the
6/// demo starts and runs silent rather than failing to compile.
7///
8/// `#[inline(never)]` keeps the fourteen megabytes out of this crate's
9/// metadata: an inlinable body carries the bytes it embeds along with it.
10#[inline(never)]
11pub fn soundfont() -> &'static [u8] {
12 include_bytes!(env!("SOUNDFONT_FILE"))
13}