Skip to content

split out kmod module as an internal crate - #278

Merged
ddiss merged 2 commits into
rapido-linux:masterfrom
ddiss:kmod_crate
Aug 7, 2026
Merged

split out kmod module as an internal crate#278
ddiss merged 2 commits into
rapido-linux:masterfrom
ddiss:kmod_crate

Conversation

@ddiss

@ddiss ddiss commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator
The kmod code is quite modular, and this appears to make it a little
easier to consume when splitting out bits of rapido-cut as a library.
Use kmod-parser as a name, to avoid conflict with the proper libkmod
bindings.

@thackara : Please let me know if you are you okay with the kmod-parser crate name. I'd be happy to use any other name if you have a preference.

The following changes since commit 7c60ff74a20a127e5adb21e7eb2e582b06c38682:

  manifest/fstests.fest: add fallocate binary (2026-08-06 12:04:01 +1000)

are available in the Git repository at:

  https://github.com/ddiss/rapido.git kmod_crate

for you to fetch changes up to 2caf5de156f8a4bb3bbd932fd06eb59c938b6826:

  ci: run kmod-parser crate tests (2026-08-06 16:27:44 +1000)

----------------------------------------------------------------
David Disseldorp (2):
      kmod: split out mod as internal kmod-parser crate
      ci: run kmod-parser crate tests

 .github/workflows/ci.yml                                 | 6 +++++-
 Cargo.lock                                               | 5 +++++
 Cargo.toml                                               | 1 +
 src/bin/kmod/mod.rs                                      | 3 ---
 src/bin/rapido-cut.rs                                    | 3 +--
 src/kmod-parser/Cargo.lock                               | 7 +++++++
 src/kmod-parser/Cargo.toml                               | 8 ++++++++
 src/{bin/kmod/kmod_context.rs => kmod-parser/src/lib.rs} | 0
 8 files changed, 27 insertions(+), 6 deletions(-)
 delete mode 100644 src/bin/kmod/mod.rs
 create mode 100644 src/kmod-parser/Cargo.lock
 create mode 100644 src/kmod-parser/Cargo.toml
 rename src/{bin/kmod/kmod_context.rs => kmod-parser/src/lib.rs} (100%)

Comment thread .github/workflows/ci.yml Outdated

@thackara thackara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let me know if you are you okay with the kmod-parser crate name.

The name looks good to me David. The PR changes look good to me as well.

ddiss added 2 commits August 7, 2026 11:16
The kmod code is quite modular, and this appears to make it a little
easier to consume when splitting out bits of rapido-cut as a library.
Use kmod-parser as a name, to avoid conflict with the proper libkmod
bindings.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Sangeetha Thackarajan <sangeetha.thackarajan@suse.com>
With the kmod module now spit out as a kmod-parser crate, ci needs to
explicitly run unit tests from the crate directory.
Use the test --manifest-path parameter instead of directory-jumping.

Suggested-by: Sangeetha Thackarajan <sangeetha.thackarajan@suse.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Sangeetha Thackarajan <sangeetha.thackarajan@suse.com>
@ddiss
ddiss merged commit a1df288 into rapido-linux:master Aug 7, 2026
2 checks passed
@ddiss
ddiss deleted the kmod_crate branch August 7, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants