Install Makoto
Get the compiler and Kamotsu, Makoto’s package manager, in one command.
Run in a macOS, Linux or Windows WSL terminal.
curl --proto '=https' -fsSL https://makoto-lang.org/install.sh | sh
The installer places the tools in ~/.makoto/bin. Run it again to update. Read the installer
Run your first program
Open a new terminal. Create a project called hello and run its entry point.
kamotsu new hello cd hello kamotsu run
The program prints hello, world. Edit src/main.mkt and run kamotsu run again to try a change.
Platform details
The prebuilt tools run on Apple silicon and Intel Macs, and on 64-bit Intel/AMD and Arm Linux machines. On Windows, open your Linux distribution in WSL and use the same install command. Set up WSL
If your shell can’t find Kamotsu
The installer configures common shell profiles. In an open Bash or Zsh terminal, load the tools into your current session and check the installed version.
export PATH="$HOME/.makoto/bin:$PATH" kamotsu --version
For other shells, add ~/.makoto/bin to your search path.
Native builds and proof certificates
To compile a native executable, use an Apple silicon Mac with Xcode installed at /Applications/Xcode.app. To produce and verify a release certificate, install Lean 4.30.0 with elan. Get Lean and elan
elan toolchain install leanprover/lean4:v4.30.0
In the hello project, build the release and verify its Ofuda.
kamotsu build --release kamotsu verify target/release/hello.ofuda target/release/hello
Update or uninstall
Rerun the install command to update. To uninstall, delete the ~/.makoto directory and remove the line that adds ~/.makoto/bin from your shell profile. Open a new terminal to pick up the change.
Build the toolchain from source
For compiler development, use Rust 1.94 or later, Git and Python 3.11 or later. The proof and native build instructions above apply to the full toolchain. Source build instructions