m4b / m4b/goblin

A better visibility control?

Open
#233 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.5k
Forks
202
PR merge metrics
No merged PRs in 30d

Description

As Rust supports a large variety of [visibility and privacy](https://doc.rust-lang.org/reference/visibility-and-privacy.html) modifiers, I think it would be better if we use more specific visibility modifier beyond `pub` and not `pub`.

For example, the `peek_bytes` and `peek` method in `src/lib.rs` may could be marked as `pub(crate)` or even private, and the `is_in_range` and other methods in `src/pe/utils.rs` may could be marked as `pub(crate)`, the `Result` type in `src/error.rs` should be marked as `pub(crate)`.

By doing this, we could get a more clear rustdoc for users to use this library.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by auditing the visibility of the example items in src/lib.rs, src/pe/utils.rs, and src/error.rs, then review the Rust visibility and privacy reference linked in the issue. Identify which items are intended for crate users versus internal use, and check the generated rustdoc. Done means the public surface is narrowed consistently without exposing internal types or methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, documentation
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.