summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build44
1 files changed, 4 insertions, 40 deletions
diff --git a/meson.build b/meson.build
index 389720b..291eeb7 100644
--- a/meson.build
+++ b/meson.build
@@ -7,48 +7,12 @@ project(
rustfmt = find_program('rustfmt')
-rust = import('rust')
fs = import('fs')
+rust = import('rust')
+cargo = rust.workspace()
+
sources = []
subdir('src')
-
-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],
-)
-
-custom_target(
- 'rustfmt',
- input: sources,
- output: 'rustfmt',
- command: [rustfmt, '--edition=2024', '--check', '@INPUT@'],
- build_always_stale: true,
-)
-
-if get_option('tests').enabled()
- rust.test('unittests', gentoo_utils)
- subdir('tests')
-endif
-
-if get_option('fuzz').enabled()
- subdir('fuzz')
-endif
-
-if get_option('docs').enabled()
- rust.doctest(
- 'doctests',
- gentoo_utils,
- dependencies: [mon, get, itertools],
- link_with: [thiserror],
- args: ['--nocapture'],
- )
-endif
+subdir('crates')