Skip to content
/ muon Public
forked from muon-build/muon

An implementation of the meson build system in c99

Notifications You must be signed in to change notification settings

amcn/muon

This branch is 90 commits behind muon-build/muon:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

75fb186 · Mar 17, 2025
Mar 14, 2025
Feb 20, 2025
Feb 3, 2025
Aug 11, 2024
Nov 5, 2024
Mar 15, 2025
Mar 14, 2025
Mar 17, 2025
Mar 16, 2025
Mar 14, 2025
Feb 12, 2025
Jan 8, 2025
Dec 21, 2024
Apr 24, 2023
Jan 27, 2025
Mar 15, 2025
Feb 20, 2025
Nov 28, 2024
Mar 14, 2025
Mar 14, 2025

Repository files navigation

muon logo

muon is an implementation of the meson build system in c99 with minimal dependencies.

  • muon analyze - a static analyzer and language server for meson.build files.
  • muon fmt - a meson.build code formatter
  • An interactive stepping debugger
  • A built-in cross platform ninja implementation
  • fast

Status

muon is close to feature-complete with the core of meson for c and c++.

See the Muon Reference for more detailed information.

Things missing include:

  • build optimizations like unity
  • some b_ options
  • dependencies with a custom configuration tool
  • some modules

Other differences from meson are described in the Muon Docs.

If you want to contribute, try using muon to build your favorite project. Patches and bug reports welcome!

Additionally, muon is not fully supported on all platforms yet. The current status may be viewed on muon's ci dashboard. Platforms with some or all tests disabled are currently WIP and platforms not tested in CI have unknown status. In general, posix systems should work fine. Windows support is improving slowly.

Dependencies

Essential:

  • A c99 compatible toolchain

For pkgconf support:

  • libpkgconf
  • pkgconf or pkg-config

For [wrap-file] support:

  • libcurl
  • libarchive

To build documentation:

  • scdoc for muon.1 and meson.build.5
  • python3 and py3-yaml for docs imported from the meson project

To run most project tests:

  • python3

Install

If you already have meson or muon and are not interested in bootstrapping, you can just do a typical meson configure, build, install:

$meson setup build
cd build
ninja build
$meson test
$meson install

Otherwise, you must bootstrap muon.

The bootstrapping process has two stages. The first stage produces a muon binary capable of building itself (but not necessarily anything else). The second stage produces the final binary.

Stage 1:

./bootstrap.sh build

This will by default build a ninja implementation (samu) into the resulting executable. To disable this behavior use CFLAGS=-DBOOTSTRAP_NO_SAMU.

Stage 2:

build/muon-bootstrap setup build
build/muon-bootstrap -C build samu
build/muon-bootstrap -C build test
build/muon-bootstrap -C build install

Contribute

Please refer to the contributing guide before sending patches. Send patches on the mailing list, report issues on the issue tracker, and discuss in #muon on libera.chat.

License

muon is licensed under the GPL version 3 (see LICENSE). Tests under tests/project were copied from the meson project tests and are licensed under Apache 2.0.

Credits

Although I had already had the idea to re-implement meson in C, I was initially inspired to actually go out and do it when I saw boson. muon's code was originally based on boson, though has since been almost completely rewritten.

About

An implementation of the meson build system in c99

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 91.9%
  • Meson 2.6%
  • C++ 2.4%
  • HTML 2.1%
  • Shell 0.6%
  • Python 0.3%
  • Other 0.1%