To easily install Crystal on macOS you can use Homebrew.
brew install crystal
You should be able to install the latest version from homebrew. Crystal’s core-team help maintain that formula.
When a new Crystal version is released you can upgrade your system using:
brew upgrade crystal
On macOS 10.14 (Mojave)
If you get an error like:
ld: library not found for -lssl (this usually means you need to install the development package for libssl)
you may need to install OpenSSL and link pkg-config to OpenSSL:
brew install openssl
As with other keg-only formulas there are some caveats shown in
brew info <formula> that shows how to link
pkg-config with this library.
The Crystal compiler will by default use
pkg-config to find the locations of libraries to link with.