project( 'thiserror', 'rust', version: '2.0.17', meson_version: '>=1.9.1', default_options: { 'rust_std': '2024', 'rust_nightly': 'enabled', 'rust_edition': 2024, }, ) rust = import('rust') syn = dependency('syn-2-rs') proc_macro2 = dependency('proc-macro2-1-rs') quote = dependency('quote-1-rs') thiserror_proc_macro = rust.proc_macro( 'thiserror_impl', 'impl/src/lib.rs', dependencies: [syn, proc_macro2, quote], ) thiserror = static_library( 'thiserror', 'src/lib.rs', rust_args: ['--cfg', 'feature="std"'], link_with: [thiserror_proc_macro], )