summaryrefslogtreecommitdiff
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.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md
index bbc92fc25..0fb9edef7 100644
--- a/docs/markdown/Rust-module.md
+++ b/docs/markdown/Rust-module.md
@@ -105,3 +105,32 @@ were never turned on by Meson.
[properties]
bindgen_clang_arguments = ['--target', 'x86_64-linux-gnu']
```
+
+### proc_macro()
+
+```meson
+rustmod.proc_macro(name, sources, ...)
+```
+
+*Since 1.3.0*
+
+This function creates a Rust `proc-macro` crate, similar to:
+```meson
+[[shared_library]](name, sources,
+ rust_crate_type: 'proc-macro',
+ native: true)
+```
+
+`proc-macro` targets can be passed to `link_with` keyword argument of other Rust
+targets.
+
+Only a subset of [[shared_library]] keyword arguments are allowed:
+- rust_args
+- rust_dependency_map
+- sources
+- dependencies
+- extra_files
+- link_args
+- link_depends
+- link_with
+- override_options