Description
Obfuscates Zig source (function shuffle, stack-frame jitter, runtime string encoding, comment removal, optional export renaming) then compiles to a native binary.
Overview
Obfuscates a Zig source program to protect intellectual property in the compiled binary, then compiles it to a self-contained native executable or library.
Transforms applied (in order):
Shuffle-ZigFunctions— randomizes function order so every build produces a different.textsection layoutInject-ZigStackJitter— inserts a random aligned buffer at each function entry, shifting all[RBP-offset]displacementsObfuscate-ZigComments— strips all//and///comments (source-level IP)Obfuscate-ZigStrings— replaces string literals with runtime XOR decoding so plaintext does not appear in.rodataObfuscate-ZigExports(optional) — renamesexport fnandpub fnsymbols in the symbol table
Parameters
| Name | Type | Description |
|---|---|---|
| Code | string | The Zig source code to obfuscate and compile. |
| ObfuscateExports | bool | Also rename exported symbol names. Default: false (safe for executables). Set true for libraries. |
| OS | ZigOS | Target OS. Default: Windows. |
| Architecture | ZigArchitecture | Target architecture. Default: x86_64. |
| Optimization | ZigOptimization | Optimization mode. Default: ReleaseSmall. |
| OutputType | ZigOutputType | Exe or Lib. Default: Exe. |
| Subsystem | ZigSubsystem | Windows PE subsystem (Console or Windows). Console shows a terminal window; Windows suppresses it. Only applies to Windows EXE targets. Default: Console. |
