diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-02-28 11:32:43 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-03-07 18:35:31 -0500 |
commit | c08b6e29d9ea70d03f34e8517d74a7fcbd21bc8c (patch) | |
tree | 522f1bcfd7d5aad44a16d5e5eb495072ebdf5aaf /docs | |
parent | 6ddba5c542a149ac090ba2fc0300131475d9769f (diff) | |
download | meson-c08b6e29d9ea70d03f34e8517d74a7fcbd21bc8c.zip meson-c08b6e29d9ea70d03f34e8517d74a7fcbd21bc8c.tar.gz meson-c08b6e29d9ea70d03f34e8517d74a7fcbd21bc8c.tar.bz2 |
Add support for rust proc-macro crates
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/snippets/rust_proc_macro_crates.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/snippets/rust_proc_macro_crates.md b/docs/markdown/snippets/rust_proc_macro_crates.md new file mode 100644 index 0000000..780a5b3 --- /dev/null +++ b/docs/markdown/snippets/rust_proc_macro_crates.md @@ -0,0 +1,16 @@ +## Rust proc-macro crates + +Rust has these handy things called proc-macro crates, which are a bit like a +compiler plugin. We can now support them, simply build a [[shared_library]] with +the `rust_crate_type` set to `proc-macro`. + +```meson +proc = shared_library( + 'proc', + 'proc.rs', + rust_crate_type : 'proc-macro', + install : false, +) + +user = executable('user, 'user.rs', link_with : proc) +``` |