rust-lang / rust-lang/rust-bindgen
Bundle libclang with bindgen
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
Goal: make it super easy for people to use bindgen (and crates to depend on bindgen without inflicting downstream pain), no installing libclang manually, no configuring LIBCLANG_PATH, no making sure your libclang is the right version.
Previously, we have speculated about getting rustup to distribute libclang for us. I talked with @alexcrichton and he pointed out that we don't even need to do that to get what we want. We can bundle libclang.{so,dll,dylib} into our crate directly and then have build.rs setup LIBCLANG_PATH as needed.
To be clear, this functionality would be behind a new feature, on by default. One could always turn this feature off to get the current behavior, and for targets for which we don't have a bundled libclang available, we will also have the current behavior.
There are still some open questions:
-
Should we put the bundled
libclanginto this repository? A differentbindgen-libclangsrepository? -
Should we use
git lfs? -
Should the
libclangs be literally bundled in the crate, and downloaded with the rest of the crate's source, or should we fetch only the target'slibclanginsidebuild.rs? -
What targets should we bundle
libclangfor? Tier-1 platforms? Start with one or two and then add more as we go?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing build.rs flow and how bindgen currently locates libclang. Resolve the repository, packaging, download, and target-support questions listed in the issue, then define the default feature, opt-out behavior, and fallback for unsupported targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100