summaryrefslogtreecommitdiff
path: root/meson.build
blob: 9e353d55307c54e8f57e53ae3778518dbac44496 (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
project(
    'gentoo-utils',
    ['rust', 'cpp'],
    meson_version: '>=1.9.1',
    default_options: {'rust_std': '2024', 'rust_nightly': 'enabled'},
)

rust = import('rust')
fs = import('fs')

mon = dependency('mon-0.1-rs')
get = dependency('get-0.1-rs')
itertools = dependency('itertools-0.14-rs')
thiserror = subproject('thiserror').get_variable('thiserror')

gentoo_utils = static_library(
    'gentoo_utils',
    'src/lib.rs',
    dependencies: [mon, get, itertools],
    link_with: [thiserror],
)

if get_option('tests').enabled()
    rust.test('unittests', gentoo_utils)
    subdir('tests')
endif

if get_option('fuzz').enabled()
    subdir('fuzz')
endif