summary refs log tree commit diff stats
path: root/rust
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-07-17 08:02:15 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-09-22 17:17:18 +0200
commit193f2ab6e076f0f3d07081802bee2d36eb86086f (patch)
tree245b7dbe4ad6d0c020e3feae783fd6d56ab4fcd5 /rust
parentf87a2e5c596620a606aaa7df4257c45c4988e160 (diff)
downloadfocaccia-qemu-193f2ab6e076f0f3d07081802bee2d36eb86086f.tar.gz
focaccia-qemu-193f2ab6e076f0f3d07081802bee2d36eb86086f.zip
subprojects: add attrs crate
The attrs crate is a simple combinator-based for Rust attributes.  It
will be used instead of a handwritten parser.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust')
-rw-r--r--rust/meson.build2
-rw-r--r--rust/qemu-macros/Cargo.toml1
-rw-r--r--rust/qemu-macros/meson.build1
3 files changed, 4 insertions, 0 deletions
diff --git a/rust/meson.build b/rust/meson.build
index c7bd6aba45..b3ac3a7197 100644
--- a/rust/meson.build
+++ b/rust/meson.build
@@ -13,10 +13,12 @@ libc_rs = dependency('libc-0.2-rs')
 subproject('proc-macro2-1-rs', required: true)
 subproject('quote-1-rs', required: true)
 subproject('syn-2-rs', required: true)
+subproject('attrs-0.2-rs', required: true)
 
 quote_rs_native = dependency('quote-1-rs', native: true)
 syn_rs_native = dependency('syn-2-rs', native: true)
 proc_macro2_rs_native = dependency('proc-macro2-1-rs', native: true)
+attrs_rs_native = dependency('attrs-0.2-rs', native: true)
 
 genrs = []
 
diff --git a/rust/qemu-macros/Cargo.toml b/rust/qemu-macros/Cargo.toml
index 3b6f1d337f..c25b6c0b0d 100644
--- a/rust/qemu-macros/Cargo.toml
+++ b/rust/qemu-macros/Cargo.toml
@@ -16,6 +16,7 @@ rust-version.workspace = true
 proc-macro = true
 
 [dependencies]
+attrs = "0.2.9"
 proc-macro2 = "1"
 quote = "1"
 syn = { version = "2", features = ["extra-traits"] }
diff --git a/rust/qemu-macros/meson.build b/rust/qemu-macros/meson.build
index d0b2992e20..0f27e0df92 100644
--- a/rust/qemu-macros/meson.build
+++ b/rust/qemu-macros/meson.build
@@ -8,6 +8,7 @@ _qemu_macros_rs = rust.proc_macro(
     '--cfg', 'feature="proc-macro"',
   ],
   dependencies: [
+    attrs_rs_native,
     proc_macro2_rs_native,
     quote_rs_native,
     syn_rs_native,