aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-06-22 09:56:11 -0700
committerDylan Baker <dylan@pnwbakers.com>2023-06-27 11:53:18 -0700
commit5d16bd5308f0edd9d53b82ff6a961241c7188423 (patch)
tree7f10cb909d47e18479dd824d25c3c62cb4668cd0 /docs
parentc5b16ab8b957d53b75c73bb24144a4f61c86234d (diff)
downloadmeson-5d16bd5308f0edd9d53b82ff6a961241c7188423.zip
meson-5d16bd5308f0edd9d53b82ff6a961241c7188423.tar.gz
meson-5d16bd5308f0edd9d53b82ff6a961241c7188423.tar.bz2
modules/rust: Add a keyword argument to pass extra args to the rust compiler
This may be necessary to, for example, stop rustc complaining about unused functions
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Rust-module.md4
-rw-r--r--docs/markdown/snippets/rust_bindegen_extra_args.md3
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md
index 30a6345..d3891bf 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, link_with: []targets)
+### test(name: string, target: library | executable, dependencies: []Dependency, link_with: []targets, rust_args: []string)
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
@@ -35,6 +35,8 @@ argument.
*(since 1.2.0)* the link_with argument can be used to pass additional build
targets to link with
+*(since 1.2.0)* the `rust_args` keyword argument can be ussed to pass extra
+arguments to the Rust compiler.
### bindgen(*, input: string | BuildTarget | [](string | BuildTarget), output: string, include_directories: [](include_directories | string), c_args: []string, args: []string, dependencies: []Dependency)
diff --git a/docs/markdown/snippets/rust_bindegen_extra_args.md b/docs/markdown/snippets/rust_bindegen_extra_args.md
new file mode 100644
index 0000000..209d0bc
--- /dev/null
+++ b/docs/markdown/snippets/rust_bindegen_extra_args.md
@@ -0,0 +1,3 @@
+## rust.bindgen allows passing extra arguments to rustc
+
+This may be necessary to pass extra `cfg`s or to change warning levels.