rust-lang / rust-lang/rust-bindgen

Make ParseCallbacks::int_macro available to the CLI

Open
#3,269 4 comments 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

As per https://github.com/rust-lang/rust-bindgen/issues/3098 and https://github.com/rust-lang/rust-bindgen/issues/3200, currently clang doesn't provide sufficient type information to tell if a macro generated integer is a u64, a u32, or anything else.

As such and until a time when clang does provide the necessary detail, it would be nice to have an override and a fallback option available. Essentially, a fallback type for all integer generating macros, and then individual overrides on a per item basis.

Filing this issue so that it can be tracked separately from the "waiting for clang api changes" issue.

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

Start by tracing how the CLI exposes ParseCallbacks and how integer-generating macros are currently handled. Review issues #3098 and #3200 for the missing clang type information and the requested fallback and per-item override behavior. Done means the CLI can configure both options for integer macros while preserving the existing clang limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.