aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Rust-module.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/Rust-module.md')
-rw-r--r--docs/markdown/Rust-module.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md
index 43dbb07..7617dbb 100644
--- a/docs/markdown/Rust-module.md
+++ b/docs/markdown/Rust-module.md
@@ -41,6 +41,7 @@ libraries. This has two advantages over hand-rolling ones own with a
- It handles `include_directories`, so one doesn't have to manually convert them to `-I...`
- It automatically sets up a depfile, making the results more reliable
+- It automatically handles assertions, synchronizing Rust and C/C++ to have the same behavior
It takes the following keyword arguments
@@ -81,3 +82,11 @@ r1 = rust.bindgen(
output : 'out.rs',
)
```
+
+
+*Since 1.1.0* Meson will synchronize assertions for Rust and C/C++ when the
+`b_ndebug` option is set (via `-DNDEBUG` for C/C++, and `-C
+debug-assertions=on` for Rust), and will pass `-DNDEBUG` as an extra argument
+to clang. This allows for reliable wrapping of `-DNDEBUG` controlled behavior
+with `#[cfg(debug_asserions)]` and or `cfg!()`. Before 1.1.0, assertions for Rust
+were never turned on by Meson.