Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Bindings not generated in macOS due to missing headers #215

@msdrigg

Description

@msdrigg

Hi, I'm

I was able to fix this on my machine with this addition to .cargo/config.toml

[env]
BINDGEN_EXTRA_CLANG_ARGS = "-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
LLVM_CONFIG_PATH = "/opt/homebrew/opt/llvm/bin/llvm-config"

But this isn't going to work with general computers (BINDGEN_EXTRA_CLANG_ARGS needs to be different). For a more general solution, these need to be set

export BINDGEN_EXTRA_CLANG_ARGS="-I$(xcrun --show-sdk-path)/usr/include"
export LLVM_CONFIG_PATH="$(brew --prefix llvm)/bin/llvm-config"

Would there be any way to add this behavior to build.rs or is this more a BUILDING.md problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions