aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Reference-manual.md1
-rw-r--r--docs/markdown/Rust-module.md35
-rw-r--r--docs/markdown/_Sidebar.md1
-rw-r--r--docs/markdown/snippets/rust_test_format_support.md4
-rw-r--r--docs/markdown/snippets/unstable-rust-module.md4
5 files changed, 45 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 924047c..525c3da 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1745,6 +1745,7 @@ test(..., env: nomalloc, ...)
to record the outcome of the test).
- `tap`: [Test Anything Protocol](https://www.testanything.org/).
- `gtest` *(since 0.55.0)*: for Google Tests.
+ - `rust` *(since 0.56.0)*: for native rust tests
- `priority` *(since 0.52.0)*:specifies the priority of a test. Tests with a
higher priority are *started* before tests with a lower priority.
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md
new file mode 100644
index 0000000..0fdba94
--- /dev/null
+++ b/docs/markdown/Rust-module.md
@@ -0,0 +1,35 @@
+---
+short-description: Rust language integration module
+authors:
+ - name: Dylan Baker
+ email: dylan@pnwbakers.com
+ years: [2020]
+...
+
+# Unstable Rust module
+
+*(new in 0.57.0)*
+
+**Note** Unstable modules make no backwards compatible API guarantees.
+
+The rust module provides helper to integrate rust code into meson. The goal
+is to make using rust in meson more pleasant, while still remaining mesonic,
+this means that it attempts to make rust work more like meson, rather than
+meson work more like rust.
+
+## Functions
+
+### test(name: string, target: library | executable, dependencies: []Dependency)
+
+This function creates a new rust unittest target from an existing rust based
+target, which may be a library or executable. It does this by copying the
+sources and arguments passed to the original target and adding the `--test`
+argument to the compilation, then creates a new test target which calls that
+executable, using the rust test protocol.
+
+This accepts all of the keyword arguments as the
+[`test`](Reference-manual.md#test) function except `protocol`, it will set
+that automatically.
+
+Additional, test only dependencies may be passed via the dependencies
+argument.
diff --git a/docs/markdown/_Sidebar.md b/docs/markdown/_Sidebar.md
index 2637d68..0ca1762 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)
diff --git a/docs/markdown/snippets/rust_test_format_support.md b/docs/markdown/snippets/rust_test_format_support.md
new file mode 100644
index 0000000..69e9aa1
--- /dev/null
+++ b/docs/markdown/snippets/rust_test_format_support.md
@@ -0,0 +1,4 @@
+## Meson test() now accepts `protocol : 'rust'`
+
+This allows native rust tests to be run and parsed by meson, simply set the
+protocol to `rust` and meson takes care of the rest.
diff --git a/docs/markdown/snippets/unstable-rust-module.md b/docs/markdown/snippets/unstable-rust-module.md
new file mode 100644
index 0000000..15a7ecb
--- /dev/null
+++ b/docs/markdown/snippets/unstable-rust-module.md
@@ -0,0 +1,4 @@
+## Untable Rust module
+
+A new unstable module has been added to make using rust with meson easier.
+Currently it adds a single function to ease defining rust tests.