Build your Program

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?

Garblearrow-up-right 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.

circle-exclamation

Build Methods

1

Standard Go build

Build your project normally.

Build (standard)
go build -o your-program
2

Go build with Garble

First, install Garble if you haven’t already:

Install Garble
go install mvdan.cc/garble@latest

Then build your project with Garble:

Build (garble)
garble build -o your-program

This will produce an obfuscated binary, making your application harder to reverse-engineer.

Additional Garble Options

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

Was this helpful?