diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2020-10-21 16:07:31 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-05 15:10:50 -0800 |
| commit | 3d80a88bd3c3dc8f9e20bbda485b0b436fd79fb3 (patch) | |
| tree | d8c4fe8fd2c76920a42e4090348681169974f2af /docs/markdown/_Sidebar.md | |
| parent | b2c2549b93a8001d8a6d9d6da1ce756645e59160 (diff) | |
| download | meson-3d80a88bd3c3dc8f9e20bbda485b0b436fd79fb3.tar.gz | |
modules: Add an unstable-rust module
Like other language specific modules this module is module for holding
rust specific helpers. This commit adds a test() function, which
simplifies using rust's internal unittest mechanism.
Rust tests are generally placed in the same code files as they are
testing, in contrast to languages like C/C++ and python which generally
place the tests in separate translation units. For meson this is
somewhat problematic from a repetition point of view, as the only
changes are generally adding --test, and possibly some dependencies.
The rustmod.test() method provides a mechanism to remove the repatition:
it takes a rust target, copies it, and then addes the `--test` option,
then creates a Test() target with the `rust` protocol. You can pass
additional dependencies via the `dependencies` keyword. This all makes
for a nice, DRY, test definition.
Diffstat (limited to 'docs/markdown/_Sidebar.md')
| -rw-r--r-- | docs/markdown/_Sidebar.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/markdown/_Sidebar.md b/docs/markdown/_Sidebar.md index 2637d686d..0ca1762b5 100644 --- a/docs/markdown/_Sidebar.md +++ b/docs/markdown/_Sidebar.md @@ -12,3 +12,4 @@ * [gnome](Gnome-module.md) * [i18n](i18n-module.md) * [pkgconfig](Pkgconfig-module.md) +* [rust](Rust-module.md) |
