RustMeUpOP•

Disclaimer: I wrote the linked crate.

I recently started exploring procedural macros, so much potential to explore!

1
Lokathor•

You need a wide_null version that puts the 0 on the end.

1
RustMeUpOP•

I figured you'd just "\0" at the end. I find it a cleaner, simpler API. It could probably use a comment in the doc string.

This avoids hard questions like, does .len() include the null terminator or not. Here the answer is clear: it does not.

2
Lokathor•

That's bad for ergonomics, but it's your lib.

0
ssokolow•

Hmm. Interesting thing to have, but probably increasingly niche, given that the APIs presented seem pretty antithetical to reproducible builds and the push for those is on the rise.

1
RustMeUpOP•

Yes this isn't really meant for use in libraries of reputable nature.

I made it specifically to target a hostile environment of game hacking, where string constants are being targetted by anti-cheats as a way of identifying suspicious modules.

Specifically the purpose of the obfuscation is to defeat automated mechanisms to detect the presence of suspicious strings.

4