diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-11-30 22:12:49 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-11-30 22:12:49 +0000 |
| commit | abf784a784c6e9282dbfbe269670da0284556a7d (patch) | |
| tree | fde86bc0c197e0e57a6061af84e6320e9db1f718 | |
| parent | 13a6ab5d21888428a13d57fa1ce6f6fdd84ddf14 (diff) | |
| download | gentoo-utils-abf784a784c6e9282dbfbe269670da0284556a7d.tar.gz | |
add some docs
| -rwxr-xr-x | check.sh | 2 | ||||
| -rw-r--r-- | check_commands.txt | 3 | ||||
| -rw-r--r-- | meson.build | 10 | ||||
| -rw-r--r-- | meson.options | 3 | ||||
| -rw-r--r-- | src/lib.rs | 66 |
5 files changed, 81 insertions, 3 deletions
@@ -12,7 +12,7 @@ if [[ -n ${ldd} ]]; then fi if [[ ! -d build ]]; then - meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build || exit $? + meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized -Ddocs=enabled build || exit $? fi meson compile -C build || exit $? diff --git a/check_commands.txt b/check_commands.txt index 1d1b424..96d8fe6 100644 --- a/check_commands.txt +++ b/check_commands.txt @@ -1,4 +1,5 @@ /usr/bin/meson format --recursive --check-only rustfmt --edition 2024 --check $(find src -type f -name '*.rs') +ninja rustdoc -C build ninja clippy -C build -meson test unittests '*repo*' '*porthole*' -C build +meson test unittests doctests '*repo*' '*porthole*' -C build diff --git a/meson.build b/meson.build index 9e353d5..8e712dd 100644 --- a/meson.build +++ b/meson.build @@ -28,3 +28,13 @@ 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 diff --git a/meson.options b/meson.options index cf0463a..bc9c8a8 100644 --- a/meson.options +++ b/meson.options @@ -1,2 +1,3 @@ option('fuzz', type: 'feature', value: 'disabled') -option('tests', type: 'feature', value: 'disabled')
\ No newline at end of file +option('tests', type: 'feature', value: 'disabled') +option('docs', type: 'feature', value: 'disabled')
\ No newline at end of file @@ -1,3 +1,17 @@ +//! Gentoo and PMS related utils. +//! +//! Currently implements: +//! - parsers for atoms and DEPEND expressions +//! - strongly typed representations of atoms, versions, etc +//! - version comparison and equality impls +//! - iterator over repos categories and ebuilds +//! +//! Planned features +//! - profile evaluation +//! - vdb reader +//! - sourcing ebuilds with bash +//! + #![deny(clippy::pedantic, unused_imports)] #