1---
2title: Release 0.42
3short-description: Release notes for 0.42
4...
5
6# New features
7
8## Distribution tarballs from Mercurial repositories
9
10Creating distribution tarballs can now be made out of projects based on
11Mercurial. As before, this remains possible only with the Ninja backend.
12
13## Keyword argument verification
14
15Meson will now check the keyword arguments used when calling any function
16and print a warning if any of the keyword arguments is not known. In the
17future this will become a hard error.
18
19## Add support for Genie to Vala compiler
20
21The Vala compiler has an alternative syntax, Genie, that uses the `.gs`
22file extension. Meson now recognises and uses Genie files.
23
24## Pkgconfig support for additional cflags
25
26The Pkgconfig module object can add arbitrary extra cflags to the Cflags
27value in the .pc file, using the "extra_cflags" keyword:
28```meson
29pkg.generate(libraries : libs,
30             subdirs : h,
31             version : '1.0',
32             name : 'libsimple',
33             filebase : 'simple',
34             description : 'A simple demo library.',
35             extra_cflags : '-Dfoo' )
36```
37
38## Base options accessible via get_option()
39
40Base options are now accessible via the get_option() function.
41```meson
42uses_lto = get_option('b_lto')
43```
44
45## Allow crate type configuration for Rust compiler
46
47Rust targets now take an optional `rust_crate_type` keyword, allowing
48you to set the crate type of the resulting artifact. Valid crate types
49are `dylib` or `cdylib` for shared libraries, and `rlib` or
50`staticlib` for static libraries. For more, see
51Rust's [linkage reference][rust-linkage].
52
53[rust-linkage]: https://doc.rust-lang.org/reference/linkage.html
54
55## Simultaneous use of Address- and Undefined Behavior Sanitizers
56
57Both the address- and undefined behavior sanitizers can now be used
58simultaneously by passing `-Db_sanitize=address,undefined` to Meson.
59
60## Unstable SIMD module
61
62A new experimental module to compile code with many different SIMD
63instruction sets and selecting the best one at runtime. This module
64is unstable, meaning its API is subject to change in later releases.
65It might also be removed altogether.
66
67
68## Import libraries for executables on Windows
69
70The new keyword `implib` to `executable()` allows generation of an import
71library for the executable.
72
73## Added build_rpath keyword argument
74
75You can specify `build_rpath : '/foo/bar'` in build targets and the
76given path will get added to the target's rpath in the build tree. It
77is removed during the install step.
78
79Meson will print a warning when the user tries to add an rpath linker
80flag manually, e.g. via `link_args` to a target. This is not
81recommended because having multiple rpath causes them to stomp on each
82other. This warning will become a hard error in some future release.
83
84## Vulkan dependency module
85
86Vulkan can now be used as native dependency. The dependency module
87will detect the VULKAN_SDK environment variable or otherwise try to
88receive the vulkan library and header via pkgconfig or from the
89system.
90
91## Limiting the maximum number of linker processes
92
93With the Ninja backend it is now possible to limit the maximum number of
94concurrent linker processes. This is usually only needed for projects
95that have many large link steps that cause the system to run out of
96memory if they are run in parallel. This limit can be set with the
97new `backend_max_links` option.
98
99## Disable implicit include directories
100
101By default Meson adds the current source and build directories to the
102header search path. On some rare occasions this is not desired. Setting
103the `implicit_include_directories` keyword argument to `false` these
104directories are not used.
105
106## Support for MPI dependency
107
108MPI is now supported as a dependency. Because dependencies are
109language-specific, you must specify the requested language with the
110`language` keyword, i.e., `dependency('mpi', language='c')` will
111request the C MPI headers and libraries. See [the MPI
112dependency](Dependencies.md#mpi) for more information.
113
114## Allow excluding files or directories from `install_subdir`
115
116The [`install_subdir`](Reference-manual.md#install_subdir) command
117accepts the new `exclude_files` and `exclude_directories` keyword
118arguments that allow specified files or directories to be excluded
119from the installed subdirectory.
120
121## Make all Meson functionality invokable via the main executable
122
123Previously Meson had multiple executables such as `mesonintrospect`
124and `mesontest`. They are now invokable via the main Meson executable
125like this:
126
127    meson configure <arguments> # equivalent to mesonconf <options>
128    meson test <arguments> # equivalent to mesontest <arguments>
129
130The old commands are still available but they are deprecated
131and will be removed in some future release.
132
133## Pcap dependency detector
134
135Meson will automatically obtain dependency information for pcap
136using the `pcap-config` tool. It is used like any other dependency:
137
138```meson
139pcap_dep = dependency('pcap', version : '>=1.0')
140```
141
142## GNOME module mkenums_simple() addition
143
144Most libraries and applications use the same standard templates for
145glib-mkenums. There is now a new `mkenums_simple()` convenience method
146that passes those default templates to glib-mkenums and allows some tweaks
147such as optional function decorators or leading underscores.
148