rust-lang / rust-lang/rust-bindgen

[feature request] request a `--wrap-inline-fns` flag, for wrapping inline functions

Open
#3,060 2 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

although currently we have generate-inline-functions, this flag requires user modify the build script and adding -fkeep-inline-functions flag, which is not supported by clang.

i'm wondering if we could generate c file by wrapping these inline functions, similar to --wrap-static-fns

i'm happy to submit a pull request for this.

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 the existing --wrap-static-fns implementation and comparing it with generate-inline-functions. Check how bindgen emits the generated C file and how clang handles the current build-script workaround. Done means a --wrap-inline-fns flag wraps inline functions without requiring -fkeep-inline-functions or build-script changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, rust
Domain
compilers, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.