rust-lang / rust-lang/rust-bindgen
Dump bound symbols for use in downstream bindgen blocklist
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
I have with N C libraries and N -sys crates. Let's say N=2 call them foo, bar, foo-sys, and bar-sys. Bar drepends on foo, and I want likewise for bar-sys to depend on foo-sys.
To do this, I need bar-sys to blocklist everything that ended up in foo-sys, so it doesn't make fresh, competing bindings for it.
I can write that by hand, but it's not very maintainable. Can i instead dump the symbols when building foo-sys and import that into bar-sys's blacklist?
The importing part is just a little bit of build.rs elbow grease. It's the exporting part that I think will require a new in bindgen itself.
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 with the build.rs workflow described in the issue and trace how bindgen collects symbols and applies blocklists. Determine the interface for exporting symbols from foo-sys and importing them into bar-sys. Done means downstream bindings can consume the exported list so bar-sys does not generate competing bindings for foo-sys symbols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100