summaryrefslogtreecommitdiff
path: root/subprojects/thiserror/meson.build
blob: 55d2fb3d4b070fb6376a707fd7fbea2fb02e7226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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],
)