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