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