How-To: Install FlatBuffers

FlatBuffers is a project from Google that allows you to encode and decode data at great speed. Here’s a quick tutorial on how to install the compiler flatc, a dependency for developers using FlatBuffers.

Installation with Homebrew on OSX

On my OSX system, I use Homebrew to manage packages. FlatBuffers can be installed with one command:

$ brew install flatbuffers

Personally, I like to install the latest development version from the official Git repository:

$ brew install flatbuffers --HEAD

If successful, you will have the flatc program accessible from your shell. To verify it’s installed, execute flatc:

Installation on Windows from binary release

Retrieving a Windows binary can be done through the FlatBuffers releases page. Grab the latest exe file and you’re all set. Note that the binary must be used with the corresponding release from that page.