aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-12-11 00:09:27 +0200
committerGitHub <noreply@github.com>2022-12-11 00:09:27 +0200
commitdbb33aaf92a581e87c1451933fe148eea6808ecc (patch)
treeee36ba59da94c02c30f92e18bb8bf59a5595a668 /docs
parentc8766468a30b997e637b21301fe9254c0c252bd2 (diff)
parentd49e6bc0384a4a01754f13edb793cb1d6ce0b836 (diff)
downloadmeson-dbb33aaf92a581e87c1451933fe148eea6808ecc.zip
meson-dbb33aaf92a581e87c1451933fe148eea6808ecc.tar.gz
meson-dbb33aaf92a581e87c1451933fe148eea6808ecc.tar.bz2
Merge pull request #11024 from dcbaker/submit/bindgen-dependencies
Add a `dependencies` keyword argument to bindgen
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Rust-module.md3
-rw-r--r--docs/markdown/snippets/rust_bindgen_deps.md5
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md
index e2c455e..65eec64 100644
--- a/docs/markdown/Rust-module.md
+++ b/docs/markdown/Rust-module.md
@@ -35,7 +35,7 @@ that automatically.
Additional, test only dependencies may be passed via the dependencies
argument.
-### bindgen(*, input: string | BuildTarget | [](string | BuildTarget), output: string, include_directories: [](include_directories | string), c_args: []string, args: []string)
+### 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
libraries. This has two advantages over hand-rolling ones own with a
@@ -54,6 +54,7 @@ It takes the following keyword arguments
these are passed to clang as `-I` arguments *(string since 1.0.0)*
- c_args — A list of string arguments to pass to clang untouched
- args — A list of string arguments to pass to `bindgen` untouched.
+- dependencies — A list of `Dependency` objects to pass to the underlying clang call (*since 1.0.0*)
```meson
rust = import('unstable-rust')
diff --git a/docs/markdown/snippets/rust_bindgen_deps.md b/docs/markdown/snippets/rust_bindgen_deps.md
new file mode 100644
index 0000000..0e8ebef
--- /dev/null
+++ b/docs/markdown/snippets/rust_bindgen_deps.md
@@ -0,0 +1,5 @@
+## rust.bindgen accepts a dependency argument
+
+The `bindgen` method of the `rust` module now accepts a dependencies argument.
+Any include paths in these dependencies will be passed to the underlying call to
+`clang`, and the call to `bindgen` will correctly depend on any generatd sources.