aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Rust-module.md
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-01-06 00:05:48 +0000
committerGitHub <noreply@github.com>2021-01-06 00:05:48 +0000
commitc9d9dacdbc9fad31f00f871b24ec6b99a611ff5e (patch)
tree07ea0773d50c41e3e87081e1be6095a7788da9df /docs/markdown/Rust-module.md
parentf9dd75f213b1c3a7ab397133b6a157ddba511d90 (diff)
parent827fa95de1c619b51457c5a04297b6ce9adc2177 (diff)
downloadmeson-c9d9dacdbc9fad31f00f871b24ec6b99a611ff5e.zip
meson-c9d9dacdbc9fad31f00f871b24ec6b99a611ff5e.tar.gz
meson-c9d9dacdbc9fad31f00f871b24ec6b99a611ff5e.tar.bz2
Merge pull request #7860 from dcbaker/wip/2020-10/rust-module
Add a rust module
Diffstat (limited to 'docs/markdown/Rust-module.md')
-rw-r--r--docs/markdown/Rust-module.md35
1 files changed, 35 insertions, 0 deletions
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.