summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-10-16 10:07:32 -0700
committerDylan Baker <dylan@pnwbakers.com>2024-02-23 09:48:32 -0800
commit05d49c6990aedb850266f22b40442af7a54e13fc (patch)
tree139893a88c8c89f5e6085220d88229c3d06540ad /docs/markdown
parent8ac434694395037e242318e6926c85c1fcccd9b8 (diff)
downloadmeson-05d49c6990aedb850266f22b40442af7a54e13fc.tar.gz
modules/rust: Allow explicitly setting the language to bind
This may be of particular use when a header is .h but should be treated as a C++ header instead of a C header.
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Rust-module.md3
-rw-r--r--docs/markdown/snippets/rust-bindgen-language.md5
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md
index 8ef8c433e..0ed5410c7 100644
--- a/docs/markdown/Rust-module.md
+++ b/docs/markdown/Rust-module.md
@@ -3,7 +3,7 @@ short-description: Rust language integration module
authors:
- name: Dylan Baker
email: dylan@pnwbakers.com
- years: [2020, 2021, 2022]
+ years: [2020, 2021, 2022, 2024]
...
# Rust module
@@ -62,6 +62,7 @@ It takes the following keyword arguments
- `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*)
+- `language`: A literal string value of `c` or `cpp`. When set this will force bindgen to treat a source as the given language. Defaults to checking based on the input file extension. *(since 1.4.0)*
```meson
rust = import('unstable-rust')
diff --git a/docs/markdown/snippets/rust-bindgen-language.md b/docs/markdown/snippets/rust-bindgen-language.md
new file mode 100644
index 000000000..edfb3bfb4
--- /dev/null
+++ b/docs/markdown/snippets/rust-bindgen-language.md
@@ -0,0 +1,5 @@
+## Overriding bindgen language setting
+
+Even though Meson will now tell bindgen to do the right thing in most cases,
+there may still be cases where Meson does not have the intended behavior,
+specifically with headers with a `.h` suffix, but are C++ headers.