| Crates.io | zalgo-codec-macro |
| lib.rs | zalgo-codec-macro |
| version | 0.1.34 |
| created_at | 2022-11-18 17:11:03.555869+00 |
| updated_at | 2025-04-17 09:44:36.699569+00 |
| description | Provides the zalgo_embed! macro for compiling source code that's been converted into a single grapheme cluster by the zalgo-codec-common crate |
| homepage | |
| repository | https://github.com/JSorngard/zalgo_codec/tree/main/macro |
| max_upload_size | |
| id | 718017 |
| size | 25,100 |
This crate provides the macro part of the crate zalgo-codec
by defining the procedural macros zalgo_embed! and zalgofy!.
The first lets you take source code that's been converted into a single grapheme
cluster by the zalgo-codec-common
crate and compile it as if it was never zalgo-ified.
This lets you reach new lows in the field of self-documenting code.
The second lets you encode a string into a single grapheme cluster at compile time.
If we run zalgo-codec-common::zalgo_encode
on the string "fn square(x: i32) -> i32 {x * x}" we can include the square
function in our program by putting the resulting grapheme cluster inside zalgo_embed!:
zalgo_embed!("E͎͓͕͉̞͉͆̀͑́͒̈̀̓̒̉̀̍̀̓̒̀͛̀̊̀͘̚͘͘͝ͅ");
assert_eq!(square(10), 100);