SDKs
...
Go SDK
v2
Build your Program
7min
building your program with go and garble when building your application using our sdk, we recommend two primary methods standard go build go build with garble both approaches are valid; however, building with garble provides additional benefits that are important to consider why build with garble? garble https //github com/burrowers/garble is a tool that works as a compiler wrapper around go build, designed to obfuscate go code here’s why we encourage you to use it obfuscation garble reduces the risk of reverse engineering by renaming symbols, stripping debug information, and minimizing the visibility of the internal structure of your binaries security protects proprietary algorithms, sensitive logic, and api interactions from easy inspection reduced binary predictability makes the binary less predictable, which can deter certain types of static analysis or targeted attacks minimal overhead garble integrates easily into the go toolchain without major changes to your build pipeline important garble is best used in release builds for development, we recommend using standard go build for faster build times and better debuggability how to build with go to build your project normally go build o your program this will produce a standard go binary without any obfuscation how to build with garble first, install garble if you haven’t already go install mvdan cc/garble\@latest then build your project with garble garble build o your program this will produce an obfuscated binary, making your application harder to reverse engineer additional garble options garble offers several options to fine tune the obfuscation process some recommended flags \ literals obfuscates literals like strings and numbers tiny reduces binary size further and increases obfuscation debug enables some debug features (not recommended for production) example with extra obfuscation garble literals tiny build o your program summary build method pros cons go build fast, easy, debuggable no protection against reverse engineering garble build obfuscated, more secure, less predictable binaries slightly slower builds, harder to debug