aya-obj: add several accessors for BTF types parsed by aya-obj#1580
Open
Evian-Zhang wants to merge 1 commit into
Open
aya-obj: add several accessors for BTF types parsed by aya-obj#1580Evian-Zhang wants to merge 1 commit into
Evian-Zhang wants to merge 1 commit into
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm new to this project, and I want to use aya to extract BTF information in an ebpf object. I find aya extremely powerful in parsing ebpf objects, with
aya_obj::Object::parse(by printing the parsed object, I'm sure that all BTF information is parsed). However, current API design makes it hardly to do anything with parsed BTF information. Almost all accessors arepub(crate). The only thing I can do isid_by_type_name_kind, which has far less information than aya actually got.So in this PR, I make some
pub(crate)APIs public, and add some new accessors.Added/updated tests?
We strongly encourage you to add a test for your changes.
pub(crate)APIs are already tested previouslyChecklist
cargo +nightly fmt.You can find failing lints with
cargo xtask clippy.cargo test.cargo xtask public-api --bless.(Optional) What GIF best describes this PR or how it makes you feel?
This change is