-
Notifications
You must be signed in to change notification settings - Fork 309
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
Extract aya-build for building eBPF crates #1101
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
9d8b361
to
b90ee6f
Compare
aya-build/src/lib.rs
Outdated
/// prevent their use for the time being. | ||
/// | ||
/// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies | ||
pub fn build_ebpf(packages: impl IntoIterator<Item = Package>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer returning an error instead of panicking (at least in places which actually can panic if the build fails).
I know that 99% of users will unwrap in build.rs anyways (that's fine and expected), but still, I would stick to the principle that libraries should return an error. There always might be that 1% of people who want to create some more sophisticated xtask and handle the error somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. In the meantime can you review #1098 which is a prerequisite of this?
@tamird, this pull request is now in conflict and requires a rebase. |
needs a rebase and a bless |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, thanks for adding the errors!
We'll use this in the template and book to avoid duplicating all the code.
Something of an experiment.
Please ignore all but the last commit.
This change is