#unicode #obfuscation #zalgo #encoding #compilation #compile-time

macro zalgo-codec-macro

Provides the zalgo_embed! macro for compiling source code that's been converted into a single grapheme cluster by the zalgo-codec-common crate

26 releases

0.1.25 Jan 14, 2024
0.1.22 Dec 21, 2023
0.1.17 Nov 28, 2023
0.1.10 Jul 29, 2023
0.1.2 Nov 20, 2022

#1277 in Procedural macros

Download history 10/week @ 2024-01-11 16/week @ 2024-02-22 15/week @ 2024-02-29 5/week @ 2024-03-07 25/week @ 2024-03-14 56/week @ 2024-03-28 30/week @ 2024-04-04 2/week @ 2024-04-11 3/week @ 2024-04-18 463/week @ 2024-04-25

527 downloads per month
Used in zalgo-codec

MIT/Apache

66KB
680 lines

zalgo-codec-macro

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.

Example

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);

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~305–740KB
~18K SLoC