rust-lang / rust-lang/rust-bindgen

--wrap-static-fns doesn't output anything if it doesn't find static functions

Open Beginner friendly
#3,370 0 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

On the surface, this looks like fine behavior. If you don't find anything to put in the file, don't write the file. However, this wreaks havoc on build systems because now whether or not a file is output at all depends on the contents of that file. If bindgen is told to output a file, it should output a file, even if that file is empty.

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 locating the implementation of the --wrap-static-fns option and trace the output-file decision when no static functions are found. Confirm the existing behavior with a minimal input, then ensure that requesting an output file still produces an empty file when there is nothing to generate.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.