Skip to content
Molto

Getting started

Installed in one command

One command installs molto and pickup as static binaries, checksum-verified, without root. From nothing to a running program in about a minute.

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

The releases publish x86-64 Linux binaries only. Windows and macOS are deliberately parked until the ecosystem has depth on one platform; on another architecture, build from source.

What the machine needs

Three things, and the third is optional because pickup can fetch it for you.

  • x86-64 Linux

    The binaries are static: no glibc requirement, nothing to unpack.

  • 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. pickup install clang fetches one if this machine has none.

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.3.3
                
                    
                          checksum verified
                
                    
                      ==> molto 0.16.0
                
                    
                          checksum verified
                
    

    Read the script before you pipe it into a shell — it is served from this site and it is 200 lines. Options go after --, for example | sh -s -- --dir /usr/local/bin, or --no-pickup for molto alone.

  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.16.0
                
                    $
                    pickup doctor
                
                    
                      ✓ gcc@12.3.0    c17, c++17
                
    

    If this machine has no compiler recent enough, pickup install clang fetches one into ~/.pickup. It needs curl, tar and zstd on the PATH.

  3. Step 3: Create your first project

    molto new writes Project.toml, src/main.c, include/, tests/ and a .gitignore. It never overwrites a file that already exists.

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

    molto run builds first, then forwards the program its own exit code. molto test builds one executable per file under tests/.

Other ways to install

The installer is a convenience, not a requirement.

By hand, from the release

Exactly what the script does, spelled out: download the binary, verify it against the checksums, put it on your PATH.


    
                $
                base=https://github.com/moltobuild/molto/releases/download/v0.16.0
            
                $
                curl -fsSLO $base/molto-0.16.0-x86_64-linux
            
                $
                curl -fsSLO $base/SHA256SUMS
            
                $
                sha256sum --check --ignore-missing SHA256SUMS
            
                $
                install -Dm755 molto-0.16.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. 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 four 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.

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

    Ask pickup what it found. If the machine genuinely has nothing recent enough, let pickup fetch one into ~/.pickup.

    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"
  • 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. The reference lives in the repository while these pages are written.

Read docs/Project.md