EazyMake
中文 · English
Write C++ — without writing CMake.
A simple C/C++ build tool — ezmk. Supports GCC, Clang, and MSVC.
Design philosophy: ease of use over feature richness. For complex builds, use CMake.
> Stable public API as of v1.1.0. Breaking changes are introduced only in 2.0.0, preceded by deprecation warnings in at least one minor version. See CHANGES.md.
Contents
Why EazyMake
- Zero config —
ezmk project new my_app && cd my_app && ezmk build and you're running
- Built-in package manager —
ezmk pkg install fmt downloads, compiles, and links automatically
- Cross-compiler — same
ezmk.toml works with GCC, Clang, and MSVC
- Extensible — Lua scripting for custom build logic and utility tools
Quick start
Your first project
ezmk project new hello
cd hello
ezmk build # compile + link
ezmk run # build + run
> Build from a subdirectory too (1.2.0+): ezmk build / ezmk test and
> friends locate ezmk.toml by walking up at most 5 parent directories from
> the current directory — drop into src/ and run directly, just like git.
Install a package
ezmk pkg install fmt # by name — official repo pre-registered
ezmk pkg install ./mylib # from a source directory (1.2.0+, no packing needed)
ezmk pkg install https://github.com/user/mylib.git # from a git repo (1.4.1+)
Install
macOS / Linux — recommended (Homebrew):
brew tap 3667808244/eazymake && brew install ezmk
> Homebrew covers macOS (Apple Silicon) and Linux x64. macOS Intel has no prebuilt binary yet — use the script below.
Arch Linux / MSYS2 — pacman (1.2.0+):
# Arch Linux
curl -fsSL https://raw.githubusercontent.com/3667808244/EazyMake/main/publish/arch/PKGBUILD -o PKGBUILD
makepkg -si
# MSYS2 (MINGW64 shell)
curl -fsSL https://raw.githubusercontent.com/3667808244/EazyMake/main/publish/arch/PKGBUILD -o PKGBUILD
makepkg -si --nodeps
> Source build (statically linked); requires base-devel (Arch) or the MINGW64 toolchain (MSYS2; --nodeps skips the dependency check). Not on AUR yet (registration unavailable) — self-serve publish/arch/PKGBUILD + makepkg -si for now.
Windows — winget:
winget install EazyMake.EazyMake
> Installs the portable ezmk.exe from the Windows release zip and puts the ezmk command on your PATH (no admin required; the manifest is published in the community microsoft/winget-pkgs repository). Update with winget upgrade EazyMake.EazyMake. The same zip carries ezmk-lua.exe; Windows has no man command, so no manual pages are installed.
Alternative — install script:
Linux / macOS / MSYS2:
curl -fsSL https://raw.githubusercontent.com/3667808244/EazyMake/main/install.sh | bash
Windows (native, no MSYS2):
irm https://raw.githubusercontent.com/3667808244/EazyMake/main/install.ps1 | iex
Customize with PREFIX, EZMK_REF, EZMK_VERSION, EZMK_NO_DEFAULT_REPO, EZMK_NO_COMPLETIONS, EZMK_NO_MAN. See install options. On Linux / macOS / MSYS2 the installer also ships the manual pages, so man ezmk and man 5 ezmk.toml work offline.
Install options
| Variable / Flag | Purpose | Default |
|---|
PREFIX | Install prefix (binary → $PREFIX/bin) | $HOME/.local |
EZMK_REF | git tag/branch/commit to build | default branch |
EZMK_VERSION | Version string baked into the binary | git describe --tags of the checkout |
EZMK_NO_DEFAULT_REPO | Set to 1 to skip official repo registration | (registers) |
EZMK_NO_COMPLETIONS | Set to 1 to skip zsh completion install | (installs when zsh is present) |
EZMK_NO_MAN | Set to 1 to skip manual page install | (installs man ezmk / man 5 ezmk.toml) |
-Version (PS) | Version tag to install — v-prefixed, e.g. "v1.4.3" | "latest" |
-InstallDir (PS) | Root install directory (binary → \bin) | $env:LOCALAPPDATA\ezmk |
-NoPath (PS) | Do not modify the user PATH | (PATH is configured) |
-DryRun (PS) | Preview without making changes | (off) |
vs CMake
| EazyMake | CMake |
|---|
ezmk project new app && cd app && ezmk build | mkdir build && cd build && cmake .. && make |
ezmk pkg install fmt | find_package(fmt) + manual install |
| 1 TOML file | 1+ CMakeLists.txt files |
| Auto-detects compiler | -DCMAKE_CXX_COMPILER=... |
Configuration
[project]
name = "myapp"
type = "executable" # executable | static | shared | utils
version = "0.1.0"
language = "C++17"
[compile]
flags = ["-Wall", "-Wextra", "-O2"]
include_dirs = ["include"]
[link]
system_target = ["pthread"]
[depends]
lib = ["fmt", "zlib"] # hard dependencies
want = ["sqlite3"] # optional dependencies
Full reference: docs/en/config_file.md
Commands at a glance
# Daily
ezmk build [flags] # incremental build
ezmk run [flags] [-- args] # build and run
ezmk clean # clear cache
ezmk watch [flags] # auto-rebuild on change
ezmk install [flags] # install artifacts to prefix
ezmk test [flags] # run project tests
ezmk pack [flags] # create distributable archive (full: ezmk project pack; --format zip|tar.gz (1.3.5+) | tgz (1.4.0-dev.5+))
# Project
ezmk project new # scaffold new project
ezmk project cc [flags] # generate compile_commands.json for clangd
ezmk project export [flags] # generate CMakeLists.txt / .vscode/ debug trio from ezmk.toml (vscode: 1.4.0-dev.1+)
ezmk project import [flags] # import a CMake project into ezmk.toml (experimental)
# Packages
ezmk pkg install # install a package
ezmk pkg search # search registered repos
ezmk pkg list # list installed packages
ezmk pkg update # update to latest (or --all for every installed package)
# Repos
ezmk repo add # register a repo
ezmk repo update # refresh repo indices
# Utilities
ezmk utils cc # generate compile_commands.json (deprecated since 1.2.0 → ezmk project cc)
# Examples (1.2.3+)
ezmk example list # list built-in examples
ezmk example hello # scaffold an example into ./hello/
# Workspaces (1.3.0+) — manage a set of projects as one unit
ezmk workspace list # list workspace members
ezmk workspace build [flags] # build all members (topological, parallel)
ezmk workspace test [flags] # run member tests
ezmk workspace watch [flags] # watch all members and rebuild on change (1.4.0-dev.5+)
ezmk workspace clean [flags] # clean member caches
ezmk workspace scan [] # adopt existing projects: create/update ezmk-workspace.toml (1.4.0-dev.7+)
# build/test/watch/clean accept -w to redirect: ezmk build -w ≡ ezmk workspace build
Full reference: docs/en/cli.md
Advanced features
| Feature | One-liner | Links |
|---|
| Semantic version constraints | [depends] entries like fmt@1.2.3 / ^1.0 / ~1.2 / >=1.0 pin dependency versions precisely | docs/en/config_file.md · Tutorial Pkg 02 |
ezmk.lock deterministic builds | Lock dependency versions and content hashes; --locked gives reproducible CI builds | docs/en/config_file.md · Tutorial Pkg 02 |
| Multi-platform / multi-toolchain precompiled packages | One package ships win-x64-msvc143 / linux-x64-gcc13-abi11 artifacts, auto-selected for the current toolchain | docs/en/package_authoring.md · Tutorial Interop 02 |
| Third-party / private repos | ezmk repo add wires in git-repo third-party sources | docs/en/repo.md · Tutorial Pkg 03 |
| CMake interop | project export cmake to export / project import --from cmake to import (experimental) | docs/en/cli.md · Tutorial Interop 01 |
| compile_commands | project cc generates compile_commands.json for clangd/IDEs | docs/en/cli.md · Tutorial Dev 02 |
| Workspace batch management (1.3.0+) | ezmk-workspace.toml declares a member set; workspace build/test/watch/clean (watch: 1.4.0-dev.5+) with topological ordering + parallelism; one-way acyclic member deps with automatic static-library artifact injection | docs/en/cli.md · Tutorial Dev 05 |
Documentation
Related links