1add_languages('rust', required: true, native: true) 2 3quote_dep = dependency('quote-1-rs', native: true) 4syn_dep = dependency('syn-2-rs', native: true) 5proc_macro2_dep = dependency('proc-macro2-1-rs', native: true) 6 7_qemu_api_macros_rs = import('rust').proc_macro( 8 'qemu_api_macros', 9 files('src/lib.rs'), 10 override_options: ['rust_std=2021', 'build.rust_std=2021'], 11 rust_args: [ 12 '--cfg', 'use_fallback', 13 '--cfg', 'feature="syn-error"', 14 '--cfg', 'feature="proc-macro"', 15 ], 16 dependencies: [ 17 proc_macro2_dep, 18 quote_dep, 19 syn_dep, 20 ], 21) 22 23qemu_api_macros = declare_dependency( 24 link_with: _qemu_api_macros_rs, 25) 26