rust-lang / rust-lang/rust-bindgen

Question about bindgen binding inspection

Open
#2,095 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

Hi! Currently, I'm bumping up against an issue where we need to support multiple versions of Linux headers for our library. Our options are:

  • Tie this to the version of the kernel module.
    • Drawbacks: we need a kernel module loaded to build our library. This could be a deal breaker.
  • Check the Linux header package version.
    • Drawbacks: there doesn't seem to be a pkg-config file for this.
  • Check the bindings
    • Drawbacks: there doesn't seem to be an easy way to do this in bindgen.

I'd prefer option 3, but only if we could avoid having to do a text search in the bindings. Is there any way to support this programmatically in bindgen at the moment?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names bindgen and Linux headers but no repository file, test, or entry point. Start by checking bindgen's current capabilities for programmatic inspection of generated bindings; done means determining whether such an API can avoid text search, or documenting that the capability is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.