Debian Codegraph @

doc/book/src/features.md

raw
1 # Features
2
3 In addition to trying maintain Meson compatibility, Muon also has a few features
4 of its own.
5
6 ### muon analyze
7
8 muon has a full-featured static analyzer for meson build scripts. It can check
9 for undefined variables, unused variables, variable reassignment to different
10 types, undefined functions, undefined kwargs, missing required args, methods,
11 operator typechecking, and more.
12
13 See `muon analyze -h` for more information.
14
15 ### muon fmt
16
17 A formatter for meson build scripts.
18
19 See `muon fmt -h` for more information.
20
21 ### Debugger (WIP)
22
23 Muon has an interactive gdb-like debugger. You can trigger it by setting
24 breakpoints with the -b flag on either setup or internal eval subcommands.
25 Inside the debugger you can look around, evaluate expressions, and step through
26 code.
27
28 ### Built-In Ninja (samurai)
29
30 Muon has an embedded copy of [samurai](https://github.com/michaelforney/samurai)
31 (at `src/external/samurai`) which has been ported to use muon's cross-platform
32 layer and so works on all the platforms muon supports. This means you can just
33 grab a single muon binary and that's all you need to build your project.
34
35 ### VM
36
37 Muon's language runtime is a fully featured stack-based VM. All scripts are
38 compiled to bytecode before execution. This runtime is powerful enough to host
39 modules as well as basic cross-platform scripting. See
40 [Scripting](scripting.md) for more information
41
42 ### Fast
43
44 Muon is orders of magnitude faster than meson when your scripts are interpreter-
45 bound. This means that as long as muon doesn't have to shell out to the compiler
46 it is very fast.
47
48 Typically the most speedup can be seen during re-configs where most compiler
49 checks have been cached.