aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-08-09 16:20:34 -0700
committerXavier Claessens <xclaesse@gmail.com>2023-09-19 13:54:49 -0400
commit8ccdb881374084ddb90ef259539cfd3bb748c904 (patch)
tree249596da64205c1b0b9cc778788d4bac4f6e7aa6 /docs
parentdd22546bdd5b7de34025437ae1360f6dd20491eb (diff)
downloadmeson-8ccdb881374084ddb90ef259539cfd3bb748c904.zip
meson-8ccdb881374084ddb90ef259539cfd3bb748c904.tar.gz
meson-8ccdb881374084ddb90ef259539cfd3bb748c904.tar.bz2
Rust: Add a rust.proc_macro() method
Diffstat (limited to 'docs')
-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 bbc92fc..0fb9ede 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