Installation

From a release (recommended for new machines)

  1. Download a compiled mstrap release from the Releases page
  2. Extract and copy mstrap to somewhere in your PATH. (/usr/local/bin is recommended)

via Homebrew (existing machines with Homebrew)

  1. brew install maxfierke/mstrap/mstrap

Compiling from source

  1. brew install crystal meson ninja (or use your system package manager)
  2. make RELEASE=1
  3. make install or sudo make install, depending on your access rights to /usr/local/bin. You may also specify PREFIX to install to a different location.

If on Linux, passing STATIC=1 TARGET_CABI=musl requires a musl-based compiler to output a fully statically-compiled binary. By default, it’s setup for compilers from musl.cc.

Static library linking w/ GNU libc is still possible with STATIC=1 on GNU libc-based Linux but libc will not be statically linked, and so the binary will not be fully static.

If on macOS, statically compiled binaries are also not supported, but we statically link to any library not provided by the base macOS if passed STATIC=1.