muon - a meson-compatible build system
muon [-vh] [-C <chdir>]
<command> [<args>]
muon build
[-D[subproject:]option=value...] <build
dir>
muon -C <build dir> test [options]
muon -C <build dir> install [options]
muon interprets source files written in the meson
dsl and produces buildfiles for a backend.
When building meson projects with muon, you
typically first start by running the setup command in the project
root. This will create buildfiles for the backend in the build
dir you specify. You then invoke the backend, e.g.
If the project defines tests, you may run them with the
test subcommand, and finally install the project with the
install subcommand.
- -C <path> - chdir to path
- -q - silence logging except for errors
- -v - turn on debug messages
- -h - show help
muon requires a command
All commands accept a -h option which prints a brief
summary of their usage.
muon analyze [
-lq] [
-m
<
normal|
script|
module>] [
-O
<
path>] [
-W <
diagnostic>]
<
command>
run a static analyzer
OPTIONS
- -l - optimize output for editor linter plugins
- -m <normal|script|module> - analyze with
language mode
- -O <path> - read project file with matching path from
stdin
- -q - only report errors
- -W <diagnostic> - enable or disable diagnostics -Wlist
can be used to list all supported diagnostics. -Werror will turn all
warnings into errors.
- -h - show help
COMMANDS
- file - analyze a single file. Implies -m module.
- lsp - run the analyzer as a language server
- root-for - determine the project root given a meson file
- trace - print a tree of all meson source files that are
evaluated
muon analyze file
analyze a single file. Implies -m module.
-m script can also be passed to analyze a file in script mode.
This is useful for catching bugs in scripts that will be evaluated with
muon internal eval, or script modules.
muon analyze lsp
run the analyzer as a language server
muon analyze root-for
determine the project root given a meson file
muon analyze trace
print a tree of all meson source files that are evaluated
muon build [
-#wW]
[
-b <
breakpoint>] [
-B <
debugger pipe>]
[
-D <
option>=<
value>] [
-p
<
file>] <
build dir|source dir> [ninja options]
[ninja targets]
setup and build in a single step
Invoke muon setup and build in a single command. Additionally,
setup will only run if the passed options have changed, including options
implicitly set using environment variables.
OPTIONS
- -# - enable setup progress bar
- -b <breakpoint> - set breakpoint
- -B <debugger pipe> - enable DAP server connected to
pipe
- -D <option>=<value> - set options
- -p <file> - preload <file>
- -w - wipe all caches before setup
- -W - only setup if options have changed
- -h - show help
muon devenv <
command to run>
run commands in developer environment
OPTIONS
- •
- -h - show help
muon fmt
[
-eilq] [
-c <
path>]
<
file>[ <
file>[...]
format a meson source file
OPTIONS
- -c <path> - read configuration from path
- -e - respect .editorconfig configuration
- -i - format files in-place
- -l - like -q but also print failing filenames
- -q - exit with 1 if files would be modified by muon fmt
- -h - show help
muon help [
-Br] [
-m
<
module>] [
-M <
path>] [query]
get help
OPTIONS
- -B - dump extra script module documentation only
- -m <module> - specify extra script module to document
(may be passed multiple times)
- -M <path> - specify moduledir for extra modules
- -r - reference. get help for meson functions
- -h - show help
muon init [project name]
create a new project
OPTIONS
- •
- -h - show help
muon install [
-nU] [
-d
<
destdir>]
install files
OPTIONS
- -d <destdir> - set destdir
- -n - dry run
- -U - uninstall
- -h - show help
muon internal <
command>
internal subcommands
OPTIONS
- •
- -h - show help
COMMANDS
- check - parse and compile meson files
- dump_docs - output docs
- dump_toolchains - output toolchain arguments
- eval - evaluate a file
- exe - run an external command
- generate_test_html - generate a html test report from a
tests.json
- repl - start a meson language repl
- summary - print a configured project's summary
muon internal check
[
-dfpr] [
-b
<
breakpoint>] [
-m
<
normal|
script|
module>] [
-o
<
offset>] <
filename>
parse and compile meson files
OPTIONS
- -b <breakpoint> - set breakpoint
- -d - print dissasembly
- -f - enable formatting mode
- -m <normal|script|module> - parse with
language mode
- -o <offset> - set an offset in hexadecimal when
printing instructions
- -p - print parsed ast
- -r - enable relaxed mode
- -h - show help
muon internal dump_docs [
-Bc]
[
-m <
module>] [
-M <
path>] [
-o
<
man|
html|
json>]
output docs
OPTIONS
- -B - dump extra script module documentation only
- -c - dump cli docs
- -m <module> - specify extra script module to document
(may be passed multiple times)
- -M <path> - specify moduledir for extra modules
- -o <man|html|json> - set output
type
- -h - show help
muon internal dump_toolchains [
-s
<
key>=<
val>] [
-t
<
component>=<
type>|list>]
output toolchain arguments
OPTIONS
- -s <key>=<val> - set the value for a
template argument
- -t <component>=<type>|list> - set the
type for a component or list all component types
- -h - show help
muon internal eval [
-es]
[
-b <
breakpoint>] [
-B <
debugger pipe>]
[
-c <
program text>] <
filename> [args]
evaluate a file
The execution environment is restricted, function availability is
marked in the reference manual.
OPTIONS
- -b <breakpoint> - set breakpoint
- -B <debugger pipe> - enable DAP server connected to
pipe
- -c <program text> - evaluate program passed in as
string
- -e - lookup <filename> as an embedded script
- -s - disable functions for fuzzing
- -h - show help
muon internal exe [
-a <
file>]
[
-c <
file>] [
-e <
file>] [
-f
<
file>] [
-R <
file>] cmd [args]
run an external command
OPTIONS
- -a <file> - load arguments from data file
- -c <file> - capture output to file
- -e <file> - load environment from data file
- -f <file> - feed file to input
- -R <file> - remove file if it exists before executing
the command
- -h - show help
muon internal generate_test_html
generate a html test report from a tests.json
OPTIONS
- •
- -h - show help
muon internal repl
start a meson language repl
OPTIONS
- •
- -h - show help
muon internal summary
print a configured project's summary
OPTIONS
- •
- -h - show help
muon meson ...
A compatibility layer that attempts to translate all flags and
operands from meson cli syntax to muon cli syntax. For example, the
following two commands:
muon meson setup build --werror --prefix=/
muon meson test -C build --list
Would be translated into the following two muon versions
respectively:
muon setup -Dwerror=true -Dprefix=/ build
muon -C build test -l
This compatibility layer is also enabled when muon's executable is
named meson.
For more detailed usage information you can use the following two
commands:
muon meson -h
muon meson <subcommand> -h
NOTE: This is a best-effort translation and does not guarantee or
imply full cli compatibility. Many unimplemented flags are ignored and
attempting to use an unsupported subcommands will result in an error.
muon options [
-am]
list project options
OPTIONS
- -a - list all options
- -m - list only modified options
- -h - show help
muon setup [
-#wW]
[
-b <
breakpoint>] [
-B <
debugger pipe>]
[
-D <
option>=<
value>] [
-p
<
file>] <
build dir|source dir>
setup a build directory
OPTIONS
- -# - enable setup progress bar
- -b <breakpoint> - set breakpoint
- -B <debugger pipe> - enable DAP server connected to
pipe
- -D <option>=<value> - set options
- -p <file> - preload <file>
- -w - wipe all caches before setup
- -W - only setup if options have changed
- -h - show help
muon subprojects [
-d
<
directory>] <
command>
manage subprojects
OPTIONS
- -d <directory> - manually specify subprojects
directory
- -h - show help
COMMANDS
- clean - clean wrap-git subprojects
- fetch - fetch a single subproject from a .wrap file
- list - list subprojects with .wrap files and their status
- update - update subprojects with .wrap files
muon subprojects clean [
-f]
<
list of subprojects>
clean wrap-git subprojects
OPTIONS
- -f - actually perform the removal
- -h - show help
muon subprojects fetch [
-o
<
directory>] <
subproject.wrap>
fetch a single subproject from a .wrap file
OPTIONS
- -o <directory> - the directory to fetch into, e.g.
subprojects
- -h - show help
muon subprojects list <
list of
subprojects>
list subprojects with .wrap files and their status
OPTIONS
- •
- -h - show help
muon subprojects update [
-f]
<
list of subprojects>
update subprojects with .wrap files
OPTIONS
- -f - fail if any subproject fails to update
- -h - show help
muon test
[
-abflrRSv]
[
-d <
auto|
dots|
bar>] [
-e
<
setup>] [
-j <
jobs>] [
-o
<
term|
html|
json>] [
-s <
suite>]
[
-t <
factor>] [test [test [...]]
run tests
OPTIONS
- -a - include all tests from all projects
- -b - run benchmarks instead of tests
- -d <auto|dots|bar> - change progress
display mode
- -e <setup> - use test setup
- -f - fail fast; exit after first failure
- -j <jobs> - set the number of test workers
- -l - list tests that would be run
- -o <term|html|json> - set output
mode
- -r - build tests only
- -R - disable automatic rebuild
- -s <suite> - only run items in <suite>,
may be passed multiple times
- -S - print a summary with elapsed time
- -t <factor> - multiply test timeouts with
<factor>
- -v - increase verbosity, may be passed twice
- -h - show help
muon version
print version information
OPTIONS
- •
- -h - show help
meson.build(5) meson-reference(3) meson(1)
Maintained by Stone Tickle <lattis@mochiro.moe>, who
is assisted by other open source contributors. For more information about
muon development, see <https://sr.ht/~lattis/muon>.