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

Use bindgen in build.rs #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nixpulvis
Copy link

I'm looking into possibly using this crate for alacritty/alacritty#4299, and during my read over of the code I was a bit surprised to see the generated.rs file was a fixed output from bindgen. I've added bindgen as a build dependency and updated the build.rs file accordingly.

The main thing I was confused about during the process was the note in the build.sh script:

Do note that macOS 10.9 (Mavericks) SDK MUST be used for code generation

in conjunction with the line:

  -IMacOSX-SDKs/MacOSX10.13.sdk/usr/include

However, it seems that this does in fact work, at least for the one system call I tested directly.

@svartalf
Copy link
Member

Hi, @nixpulvis! Yes, using bindgen directly sounds like a better solution, I used pre-generated bindings file only for two reasons:

  1. I don't have macOS on hand and cross-compilation does not really works because of missing headers on Linux (unless you download them from somewhere, etc, etc, you know the drill)
  2. As darwin-libproc is at the moment used only by me, I was not spending much time on its quality or functionality coverage as long as it's good enough for being used in heim crate.

I agree that fixing all these small quirks and stabilizing it in a nearest future would be great; I'll try to check your PR a bit later today!

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