zalgo_embed!() { /* proc-macro */ }
Expand description

This macro decodes a Unicode string that has been encoded with zalgo_encode and passes the results on to the compiler.

Examples

We can use a function created in encoded source code:

// This line expands to the code
// `fn add(x: i32, y: i32) -> i32 {x + y}`
zalgo_embed!("E͎͉͙͉̞͉͙͆̀́̈́̈́̈̀̓̒̌̀̀̓̒̉̀̍̀̓̒̀͛̀̋̀͘̚̚͘͝");

// Now the `add` function is available
assert_eq!(add(10, 20), 30);

It works on expressions too!

let x = 20;
let y = -10;

// This macro is expanded to the code
// `x + y`
let z = zalgo_embed!("È͙̋̀͘");
assert_eq!(z, x + y);