add rustfmt target
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/usr/bin/meson format --recursive --check-only
|
/usr/bin/meson format --recursive --check-only
|
||||||
rustfmt --edition 2024 --check $(find src -type f -name '*.rs')
|
ninja rustfmt -C build
|
||||||
ninja rustdoc -C build
|
ninja rustdoc -C build
|
||||||
ninja clippy -C build
|
ninja clippy -C build
|
||||||
meson test -v unittests doctests '*repo*' '*porthole*' -C build
|
meson test -v unittests doctests '*repo*' '*porthole*' -C build
|
||||||
|
|||||||
14
meson.build
14
meson.build
@@ -5,9 +5,15 @@ project(
|
|||||||
default_options: {'rust_std': '2024', 'rust_nightly': 'enabled'},
|
default_options: {'rust_std': '2024', 'rust_nightly': 'enabled'},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
rustfmt = find_program('rustfmt')
|
||||||
|
|
||||||
rust = import('rust')
|
rust = import('rust')
|
||||||
fs = import('fs')
|
fs = import('fs')
|
||||||
|
|
||||||
|
sources = []
|
||||||
|
|
||||||
|
subdir('src')
|
||||||
|
|
||||||
mon = dependency('mon-0.1-rs')
|
mon = dependency('mon-0.1-rs')
|
||||||
get = dependency('get-0.1-rs')
|
get = dependency('get-0.1-rs')
|
||||||
itertools = dependency('itertools-0.14-rs')
|
itertools = dependency('itertools-0.14-rs')
|
||||||
@@ -20,6 +26,14 @@ gentoo_utils = static_library(
|
|||||||
link_with: [thiserror],
|
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()
|
if get_option('tests').enabled()
|
||||||
rust.test('unittests', gentoo_utils)
|
rust.test('unittests', gentoo_utils)
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|||||||
1
src/atom/meson.build
Normal file
1
src/atom/meson.build
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sources += files('mod.rs', 'parsers.rs')
|
||||||
5
src/meson.build
Normal file
5
src/meson.build
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
sources += files('lib.rs')
|
||||||
|
|
||||||
|
subdir('atom')
|
||||||
|
subdir('repo')
|
||||||
|
subdir('useflag')
|
||||||
1
src/repo/ebuild/meson.build
Normal file
1
src/repo/ebuild/meson.build
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sources += files('mod.rs', 'parsers.rs')
|
||||||
3
src/repo/meson.build
Normal file
3
src/repo/meson.build
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
sources += files('mod.rs')
|
||||||
|
|
||||||
|
subdir('ebuild')
|
||||||
1
src/useflag/meson.build
Normal file
1
src/useflag/meson.build
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sources += files('mod.rs', 'parsers.rs')
|
||||||
Reference in New Issue
Block a user