Skip to content
Molto

Getting started

Installed in one command

One command installs molto and pickup, checksum-verified, without root or administrator rights — on Linux, Windows and macOS. From nothing to a running program in about a minute.

Linux and macOS

$ curl -fsSL https://moltobuild.dev/install.sh | sh

Windows (PowerShell)

PS> irm https://moltobuild.dev/install.ps1 | iex

On Windows the installer adds its directory to your user PATH, so open a new terminal afterwards. Every option, and what each platform publishes, is in the install docs.

What the machine needs

Three things, and the third is only needed once you build something of your own.

  • Linux, Windows or macOS

    x86-64 Linux (a static binary, no glibc requirement), x86-64 Windows 10 or later, or macOS on Apple silicon.

  • curl

    To fetch the binaries. The installer needs nothing else.

  • A C or C++ compiler, eventually

    To build your own projects, not to install Molto. On Linux, pickup install clang fetches one if the machine has none; on Windows, MSYS2's GCC; on macOS, xcode-select --install.

Step

  1. Step 1: Install molto and pickup

    One command fetches both binaries, checks them against the SHA256SUMS published beside the release and puts them in ~/.local/bin. No root, nothing to unpack.

    
        
                    $
                    curl -fsSL https://moltobuild.dev/install.sh | sh
                
                    
                      ==> pickup 0.11.0
                
                    
                          checksum verified
                
                    
                      ==> molto 0.54.0
                
                    
                          checksum verified
                
    

    Read the script before you pipe it into a shell — it is served from this site. Options go after --, for example | sh -s -- --dir /usr/local/bin, or --no-pickup for molto alone. On Windows it installs into %LOCALAPPDATA%\Programs\molto.

  2. Step 2: Check what the machine can build with

    Molto never chooses a compiler on its own: it asks pickup, and pickup proves every capability by compiling a program that uses it. doctor reports what is missing and how to fix it.

    
        
                    $
                    molto --version
                
                    
                    molto 0.54.0
                
                    $
                    pickup doctor
                
                    
                    compilers
                
                    
                      ✓ 1 found - gcc 14.2.0
                
                    
                      ✓ 1 of them build C and C++
                
    

    If a Linux machine has no compiler recent enough, pickup install clang fetches one into ~/.local/share/pickup; it needs curl, tar and zstd. On Windows and macOS pickup answers for the compiler you already have.

  3. Step 3: Create your first project

    molto new --bin writes Project.toml, src/main.c and a .gitignore. It never overwrites a file that already exists, and the same project builds on all three platforms.

    
        
                    $
                    molto new my_app --bin
                
                    $
                    cd my_app
                
                    $
                    molto run
                
                    
                    Hello, world!
                
    

    Without --bin, molto new makes a library with moltest tests already set up: molto test builds and runs them. molto run builds first, then forwards the program its own exit code.

  4. Step 4: Add a dependency

    molto add asks the registry for the newest release and writes that exact version into Project.toml. The next build fetches it into a cache every project on the machine shares.

    
        
                    $
                    molto add sqlite
                
                    
                    Added sqlite = "3.53.4" to [deps]
                
                    $
                    molto build
                
                    
                     ✓ Finished `debug` build
                
    

    Versions are exact and Molto.lock records what was resolved, so commit it. molto add gtk works too: it uses the system GTK, or downloads your platform's own packages.

Other ways to install

The installer is a convenience, not a requirement.

By hand, from the release

Exactly what the script does, spelled out for Linux: download the binary, verify it against the checksums, put it on your PATH. The release also carries molto-<version>-x86_64-windows.exe and molto-<version>-arm64-macos.


    
                $
                base=https://github.com/moltobuild/molto/releases/download/v0.54.0
            
                $
                curl -fsSLO $base/molto-0.54.0-x86_64-linux
            
                $
                curl -fsSLO $base/SHA256SUMS
            
                $
                sha256sum --check --ignore-missing SHA256SUMS
            
                $
                install -Dm755 molto-0.54.0-x86_64-linux ~/.local/bin/molto
            

From source

The Makefile is the bootstrap: it exists for the case where there is no molto yet. Needs gcc 12 or newer and GNU Make — on macOS, make build CC=clang with Xcode's tools. Molto also builds itself once you have it.


    
                $
                git clone https://github.com/moltobuild/molto
            
                $
                cd molto && make build
            
                $
                install -Dm755 build/molto ~/.local/bin/molto
            

When it does not work

The five things that actually go wrong on a first install.

  • command not found: molto

    The binary landed in ~/.local/bin, which your shell does not search. Add it to PATH in your shell profile. On Windows, open a new terminal: the one you installed from keeps its old PATH.

    export PATH="$HOME/.local/bin:$PATH"
  • Molto reports that no toolchain satisfies the project

    Ask pickup what it found. If a Linux machine genuinely has nothing recent enough, let pickup fetch one; on Windows install MSYS2's GCC, on macOS Xcode's command line tools.

    pickup doctor && pickup install clang
  • Molto cannot find pickup

    Molto looks for pickup on the PATH. Point it somewhere else with MOLTO_PICKUP.

    export MOLTO_PICKUP="$HOME/.local/bin/pickup"
  • molto run says the project has nothing to run

    molto new makes a library by default, and a library has nothing to run: molto test exercises it. For a program, create it with --bin.

    molto new my_app --bin
  • It builds with make, but every #include fails under Molto

    Molto discovers your sources, never your build settings. A manifest without include builds with no -I at all.

    include = ["include"]

Where to go next

Project.toml has a key for everything the build needs: profiles, defines, link libraries, test layout and dependencies. That is the reference to read next — or start from a complete project in molto-examples: a wc clone, a GTK calculator, a GTK to-do list kept in SQLite, a REST API on libwebsockets or a piano with SDL 3 and FFmpeg.