Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Add a Python binding for kernel-abi-check#225

Merged
danieldk merged 8 commits into
mainfrom
kernel-abi-check-python
Sep 24, 2025
Merged

Add a Python binding for kernel-abi-check#225
danieldk merged 8 commits into
mainfrom
kernel-abi-check-python

Conversation

@danieldk

Copy link
Copy Markdown
Member

We want to make a kernels check command, so we need to make these available in Python-land. This is mostly a straightforward mirroring from the Rust API.

@danieldk danieldk force-pushed the kernel-abi-check-python branch from ed6b560 to 42b70d4 Compare September 23, 2025 15:55
@danieldk danieldk force-pushed the kernel-abi-check-python branch from 0da3adb to 1ccc29a Compare September 23, 2025 19:04
@danieldk danieldk marked this pull request as ready for review September 23, 2025 19:04

@ivarflakstad ivarflakstad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not an expert at the requirements/design, but that's not really in question here either. In any case the pyo3 usage looks good to me :)

Comment on lines +158 to +162
_ => {
return Err(PyValueError::new_err(format!(
"Unsupported binary format: {binary_format:?}"
)));
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: if we currently support all enums then maybe it's better to not include the _ case as all it does is move catching this case from compile time to runtime.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need a catch-other, because the enum is non-exhaustive: https://docs.rs/object/latest/object/enum.BinaryFormat.html#variants

@danieldk danieldk merged commit 051fbc3 into main Sep 24, 2025
11 checks passed
@danieldk danieldk deleted the kernel-abi-check-python branch September 24, 2025 11:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants