Meson 1.3 Assembly System Now Available

Published build system release Meson 1.3.0, which is used to build projects such as X.Org Server, Mesa, Lighttpd, systemd, GStreamer, Wayland, GNOME and GTK. The Meson code is written in Python and supplied licensed under Apache 2.0.

The key goal of Meson development is to provide high speed of the assembly process combined with convenience and ease of use. Instead of the make utility, the Ninja toolkit is used by default when building, but other backends such as xcode and VisualStudio can also be used. The system has a built-in multi-platform dependency handler that allows you to use Meson to build packages for distributions. Assembly rules are specified in a simplified domain-specific language, are highly readable and understandable to the user (as intended by the authors, the developer should spend a minimum of time writing rules).


Supported cross-compile and build on Linux, Illumos/Solaris, FreeBSD, NetBSD, DragonFly BSD, Haiku, macOS and Windows using GCC, Clang, Visual Studio and other compilers. It is possible to build projects in various programming languages, including C, C++, Fortran, Java and Rust. Incremental build mode is supported, in which only components directly related to changes made since the last build are rebuilt. Meson can be used to generate repeatable builds, in which running the build in different environments results in the generation of completely identical executable files.

Basic innovations Meson 1.3:

  • Added “werror: true” option to the compiler check methods compiler.compiles(), compiler.links() and, which treats compiler warnings as errors (can be used to check that the code is built without warnings).
  • Added has_define method to check symbol definition by preprocessor.
  • The macro_name parameter has been added to the configure_file() function, adding macroprotection double connection via “#include” (“include guards”), designed in the style of macros in the C language (simplifies the creation of configure files with dynamic macro names).
  • A new output format has been added to configure_file() – JSON (“output_format: json”).
  • Added the ability to use lists of values ​​to the c_std and cpp_std parameters (for example, “default_options: ‘c_std=gnu11,c11′”).
  • In modules that use CustomTarget to process files, the ability to customize messages output by the ninja utility has been added.
  • The build_target “jar” has been deprecated and the “jar()” call is recommended instead.
  • The ‘env’ parameter has been added to the generator.process() method to set the environment variable through which the generator will process input.
  • When specifying build target names associated with executables, suffixes such as “executable(‘foo’, ‘main.c’, name_suffix: ‘bar’)” are allowed to generate additional executables in the same directory.
  • The “vs_module_defs” parameter has been added to the exectuable() function to use a def file that defines the list of functions passed to shared_module().
  • Added ‘default_options’ parameter to find_program() function to set default options for fallback subproject.
  • Added fs.relative_to() method, which returns the relative path for the first argument, relative to the second, if the first path exists. For example, “fs.relative_to(‘/prefix/lib’, ‘/prefix/bin’) == ‘../lib’)”.
  • The following_symlinks parameter has been added to the install_data(), install_headers() and install_subdir() functions; when set, symbolic links are followed.
  • A “fill” parameter has been added to the int.to_string() method to incrementally fill the string with leading zeros. For example, calling message(n.to_string(fill: 3)) for n=4 will produce the string “004”.
  • Added a new target, clang-tidy-fix, that specifies running the clang-tidy utility with the “-fix” flag.
  • The ability to specify the suffix (TARGET_SUFFIX) of the assembly target ((PATH_TO_TARGET/)TARGET_NAME.TARGET_SUFFIX(:TARGET_TYPE)) has been added to the compile command.
  • Added environment variable MESON_PACKAGE_CACHE_DIR to override the path to the package cache (subprojects/packagecache), for example, allowing you to use a shared cache in several projects.
  • Added “meson setup –clearcache” command to clear persistent cache.
  • All “has_*” compiler check methods now support the “required” keyword, for example, instead of “assert(cc.has_function(‘some_function’))” you can now specify “cc.has_function(‘some_function’, required: true)”.
  • A new keyword, rust_abi, has been added to the shared_library(), static_library(), library(), and shared_module() functions, which should be used instead of the deprecated rust_crate_type.

Thanks for reading: