diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-08-09 16:20:34 -0700 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2023-09-19 13:54:49 -0400 |
commit | 8ccdb881374084ddb90ef259539cfd3bb748c904 (patch) | |
tree | 249596da64205c1b0b9cc778788d4bac4f6e7aa6 /docs | |
parent | dd22546bdd5b7de34025437ae1360f6dd20491eb (diff) | |
download | meson-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.md | 29 |
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 |