How it works

This buildpack will unarchive your binary and add it to /app/custom_bin when
Heroku compiles your project's slug. It will also create a
profile.d script
that will append this directory to $PATH to your binary whenever your app is
deployed.

Sounds great! But how do I build a binary that works with Heroku?

Great news! All Heroku projects use Heroku's
Cedar-14 stack on Ubuntu 14.04 LTS
so you have to do is compile your binary on a similar environment, compress it
into a gzipped tarball, then host it somewhere it's available via url.

Compile your binary for Heroku

The simplest way to do this is to compile from source on either a fresh Heroku
project or using the Heroku's Cedar-14 docker image.

Using Heroku

Create a blank Heroku project:

heroku create
heroku run bash --app that-projects-name

Then you can build from source and transfer it locally using git or scp.

Docker Cedar-14 Image

You can also use Heroku's official Cedar-14 image:

docker run -it heroku/cedar:14 bash

This has the additional convenience of being able transfer your binary to a
bind-mounted volume when you use the -v flag.

Host a gzipped tarball

Build a gzipped tarball bundle of the resulting binary:

tar -cvzf archive-name.tar.gz binary-to-compress

Then make it available via URL through Amazon S3 or your favorite online
file storage.