From c08b6e29d9ea70d03f34e8517d74a7fcbd21bc8c Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 28 Feb 2022 11:32:43 -0800 Subject: Add support for rust proc-macro crates --- docs/markdown/snippets/rust_proc_macro_crates.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/markdown/snippets/rust_proc_macro_crates.md (limited to 'docs/markdown/snippets') 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) +``` -- cgit v1.1