| muon(1) | General Commands Manual | muon(1) |
NAME¶
muon - a meson-compatible build system
SYNOPSIS¶
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]
DESCRIPTION¶
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.
ninja -C <build dir>
If the project defines tests, you may run them with the test subcommand, and finally install the project with the install subcommand.
OPTIONS¶
- -C <path> - chdir to path
- -q - silence logging except for errors
- -v - turn on debug messages
- -h - show help
COMMANDS¶
muon requires a command
All commands accept a -h option which prints a brief summary of their usage.
analyze¶
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
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.
analyze lsp¶
run the analyzer as a language server
analyze root-for¶
determine the project root given a meson file
analyze trace¶
print a tree of all meson source files that are evaluated
build¶
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
devenv¶
run commands in developer environment
OPTIONS
- •
- -h - show help
fmt¶
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
help¶
get help
OPTIONS
- -r - reference. get help for meson functions
- -h - show help
install¶
install files
OPTIONS
- -d <destdir> - set destdir
- -n - dry run
- -U - uninstall
- -h - show help
internal¶
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
internal check¶
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
internal dump_docs¶
output docs
OPTIONS
- -c - dump cli docs
- -o <man|html|json> - set output type
- -h - show help
internal dump_toolchains¶
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
internal eval¶
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
internal exe¶
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
internal generate_test_html¶
generate a html test report from a tests.json
OPTIONS
- •
- -h - show help
internal repl¶
start a meson language repl
OPTIONS
- •
- -h - show help
internal summary¶
print a configured project's summary
OPTIONS
- •
- -h - show help
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.
options¶
list project options
OPTIONS
- -a - list all options
- -m - list only modified options
- -h - show help
setup¶
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
subprojects¶
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
subprojects clean¶
clean wrap-git subprojects
OPTIONS
- -f - actually perform the removal
- -h - show help
subprojects fetch¶
fetch a single subproject from a .wrap file
OPTIONS
- -o <directory> - the directory to fetch into, e.g. subprojects
- -h - show help
subprojects list¶
list subprojects with .wrap files and their status
OPTIONS
- •
- -h - show help
subprojects update¶
update subprojects with .wrap files
OPTIONS
- -f - fail if any subproject fails to update
- -h - show help
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
version¶
print version information
OPTIONS
- •
- -h - show help
SEE ALSO¶
meson.build(5) meson-reference(3) meson(1)
AUTHORS¶
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>.
| muon 0.6.0- |