Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aya: add program_info() api to Program #782

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Conversation

astoycos
Copy link
Member

@astoycos astoycos commented Sep 8, 2023

Add a new api to the outer level Program structure which allows users to get the program's kernel info before casting it to an explicit program variant.

@netlify
Copy link

netlify bot commented Sep 8, 2023

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6ab7475
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/650841ab292a4200080d2053
😎 Deploy Preview https://deploy-preview-782--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mergify mergify bot added the aya This is about aya (userspace) label Sep 8, 2023
@mergify
Copy link

mergify bot commented Sep 8, 2023

Hey @alessandrod, this pull request changes the Aya Public API and requires your review.

@mergify mergify bot requested a review from alessandrod September 8, 2023 19:44
@mergify mergify bot added api/needs-review Makes an API change that needs review test A PR that improves test cases or CI labels Sep 8, 2023
///
/// This information is populated at load time by the kernel and can be used
/// to get kernel details for a given [`Program`].
pub fn program_info(&self) -> Result<ProgramInfo, ProgramError> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why program_info and not info?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done! Also fixed up the existing API so that we're consistent.

aya/src/programs/mod.rs Outdated Show resolved Hide resolved
Add a new api to the outer level `Program` structure which
allows users to get the program's kernel info before casting
it to an explicit program variant.

Signed-off-by: astoycos <astoycos@redhat.com>
@astoycos astoycos merged commit 0b6ea31 into aya-rs:main Sep 18, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/needs-review Makes an API change that needs review aya This is about aya (userspace) test A PR that improves test cases or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants