diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-06-21 12:02:06 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2023-06-27 11:53:18 -0700 |
commit | 43f24060f3e0065b44b1909d88bcc8e2882e9e5e (patch) | |
tree | 0350478696a6bd7270279d184518ce1daf27943c /docs/markdown | |
parent | 78b8d447eea08445c9708bc0e3ba3c886717f6cd (diff) | |
download | meson-43f24060f3e0065b44b1909d88bcc8e2882e9e5e.zip meson-43f24060f3e0065b44b1909d88bcc8e2882e9e5e.tar.gz meson-43f24060f3e0065b44b1909d88bcc8e2882e9e5e.tar.bz2 |
modules/rust: Add a `link_with` kwarg to the test method
This was requested by Mesa, where a bunch of `declare_dependency`
objects are being created as a workaround for the lack of this keyword
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Rust-module.md | 5 | ||||
-rw-r--r-- | docs/markdown/snippets/rust_test_link_with.md | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md index 7617dbb..512c4ec 100644 --- a/docs/markdown/Rust-module.md +++ b/docs/markdown/Rust-module.md @@ -18,7 +18,7 @@ like Meson, rather than Meson work more like rust. ## Functions -### test(name: string, target: library | executable, dependencies: []Dependency) +### test(name: string, target: library | executable, dependencies: []Dependency, link_with: []targets) 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 @@ -33,6 +33,9 @@ that automatically. Additional, test only dependencies may be passed via the dependencies argument. +*(since 1.2.0)* the link_with argument can be used to pass additional build +targets to link with + ### bindgen(*, input: string | BuildTarget | [](string | BuildTarget), output: string, include_directories: [](include_directories | string), c_args: []string, args: []string, dependencies: []Dependency) This function wraps bindgen to simplify creating rust bindings around C diff --git a/docs/markdown/snippets/rust_test_link_with.md b/docs/markdown/snippets/rust_test_link_with.md new file mode 100644 index 0000000..9c2b7d6 --- /dev/null +++ b/docs/markdown/snippets/rust_test_link_with.md @@ -0,0 +1,4 @@ +## Add a `link_with` keyword to `rust.test()` + +This can already be be worked around by creating `declare_dependency()` objects +to pass to the `dependencies` keyword, but this cuts out the middle man. |