Name Date Size #Lines LOC

..15-May-2026-

src/H15-May-2026-9983

Cargo.tomlH A D15-May-2026214 1311

README.mdH A D15-May-2026711 1612

README.md

1# byte-array-literals
2
3This crate exists to solve a very peculiar problem for the
4`wasi-preview1-component-adapter`: we want to use string literals in our
5source code, but the resulting binary (when compiled for
6wasm32-unknown-unknown) cannot contain any data sections.
7
8The answer that @sunfishcode discovered is that these string literals, if
9represented as an array of u8 literals, these will somehow not end up in the
10data section, at least when compiled with opt-level='s' on today's rustc
11(1.69.0). So, this crate exists to transform these literals using a proc
12macro.
13
14It is very possible this cheat code will abruptly stop working in some future
15compiler, but we'll cross that bridge when we get to it.
16