Download

Get Marlin

The compiler, its standard library and runtime in one package for Linux, macOS and Windows. Free and open source under the MIT license.

Install with one command

The installer downloads the latest release for your machine, checks its SHA-256 checksum, puts it in your home folder and adds marlin to your PATH. Run it again to update.

Your system

Linux

x86-64 and ARM64 · glibc 2.28 or newer (Ubuntu 20.04, Debian 10, RHEL 8, Fedora, Arch …)

terminal
$ curl -fsSL https://github.com/MehmetEminKaymaz/marlin/releases/latest/download/install.sh | sh

You also need a C compiler: sudo apt install build-essential, sudo dnf install gcc or sudo pacman -S base-devel.

Your system

macOS

Apple silicon and Intel · macOS 11 Big Sur or newer

terminal
$ curl -fsSL https://github.com/MehmetEminKaymaz/marlin/releases/latest/download/install.sh | sh

You also need the Command Line Tools: xcode-select --install.

Your system

Windows

Windows 10 and 11 · x64

PowerShell
PS> irm https://github.com/MehmetEminKaymaz/marlin/releases/latest/download/install.ps1 | iex

You also need Visual Studio Build Tools with C++ and Clang. One command installs them.

Prefer to do it by hand? Download the archive for your system above, unpack it anywhere and add its bin folder to your PATH. On macOS, remove the browser's quarantine flag first: xattr -dr com.apple.quarantine marlin-*.

After installing

  1. Open a new terminal

    So that the PATH change takes effect.

  2. Check your setup

    marlin doctor compiles a few small programs and tells you what is missing, with the command to install it.

  3. Write and run

    You get a native executable. Continue with the guide.

terminal
$ marlin doctor

# hello.marl:  func main() -> void { print("hello, ocean"); }
$ marlin hello.marl -O2 -o hello
$ ./hello
hello, ocean

VS Code extension

Syntax colouring, snippets, live errors from the real compiler and a one-key Compile & Run. Install Marlin first; the extension uses the marlin command.

Windows: Build Tools with Clang

Marlin links your programs with Clang and the Microsoft C libraries. If marlin doctor reports that the linker is missing, this installs both (about 3 GB):

PowerShell
PS> winget install Microsoft.VisualStudio.2022.BuildTools --override "--passive --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --includeRecommended"

Already have Visual Studio? Add the Desktop development with C++ workload and the C++ Clang tools for Windows component in the Visual Studio Installer instead.

Update, uninstall, verify

Linux / macOSWindows (PowerShell)
Updaterun the install command againrun the install command again
Uninstallcurl -fsSL https://github.com/MehmetEminKaymaz/marlin/releases/latest/download/install.sh | sh -s -- --uninstall$env:MARLIN_UNINSTALL = "1"; irm https://github.com/MehmetEminKaymaz/marlin/releases/latest/download/install.ps1 | iex
Install a specific versioncurl -fsSL …/install.sh | MARLIN_VERSION=0.1.0 sh$env:MARLIN_VERSION = "0.1.0"; irm …/install.ps1 | iex
Checksum of a downloadsha256sum (macOS: shasum -a 256)Get-FileHash

Compare with SHA256SUMS. Older versions and release notes are on the releases page; the source code is on GitHub.