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

generate bindings during build #16

Merged
merged 19 commits into from
Oct 21, 2024

Conversation

rosetta-jpn
Copy link
Collaborator

No description provided.

@rosetta-jpn
Copy link
Collaborator Author

Bartek, could you review this patch?

Copy link
Collaborator

@bgrzesik bgrzesik left a comment

Choose a reason for hiding this comment

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

Hi! I understand your take on this and in ideal world I would also love to handle this in this manner. However I do have few concerns:

  • Not all build systems do support cargo build scripts. To name one, an Android Soong is good example. In Soong's case generating a bingings during build time would have to be done in a separate crate. This way we can keep everything in one crate.
  • With switch to generation of the bindings during build time, the missing symbols would cause compile errors rather then linking errors. IMHO the later is much more favored in case of libraries, because the use case defines if it is critical.
  • It is rather a nit, however having a generated bingings in a commit diff, allows verification if the bingings have just only upreved and continue to be "fresh"

- name: "Check out libva"
run: |
curl -O -L https://github.com/intel/libva/releases/download/2.22.0/libva-2.22.0.tar.bz2 && \
tar xf libva-2.22.0.tar.bz2 --one-top-level=work --strip-components 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason why not use apt install libva-devel?

build.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@bgrzesik bgrzesik left a comment

Choose a reason for hiding this comment

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

LGTM, but please squash the changes into only a few commits to avoid unnecessary clutter in the commit log 😄

@rosetta-jpn rosetta-jpn merged commit fda656e into chromeos:main Oct 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants