Incompatibility with non-mod.rs module layout
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3k
- Forks
- 386
- Avg merge
- 1h 43m
- Merged PRs (30d)
- 1
Description
Standard suggests to prefer package layout like:
src/
├─ lib.rs
├─ util.rs
└─ util/
└─ config.rs
instead of
src/
├─ lib.rs
└─ util/
├─ mod.rs
└─ config.rs
[...] It is encouraged to use the new naming convention as it is more consistent, [...]
However, this does not seems compatible with current cbindgen source parsing: https://github.com/mozilla/cbindgen/blob/b105f550ed0d62e9207cb7da694ca8b988f32f18/src/bindgen/parser.rs#L266-L266
where only mod.rs seems to be detected as module.
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 in src/bindgen/parser.rs at the referenced module-detection code and compare its handling of mod.rs with Rust's outlined module layout. Verify that a util.rs module can be discovered alongside util/config.rs, and confirm cbindgen processes the non-mod.rs structure correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100