3 ms·
TIL about #embed. Awesomeness! And in hindsight, why didn't we get this earlier? :D
by qiqitori 3y ago
TIL about #embed. Awesomeness! And in hindsight, why didn't we get this earlier? :D
- tialaramex 3y agoIf you haven't read it already, https://thephd.dev/finally-embed-in-c23 https://thephd.dev/finally-embed-in-c23 explains Rust had include_bytes! from Rust 1.0, include_bytes! is philosophically the same thing, given a filename, it gives you an immutable reference which lives as long as your program, to an array of bytes from the file -- &'static [u8; N]