External Publication
Visit Post

Pre-RFC: `pub(api)` visibility, and static enforcement of crate-internal API boundaries

Rust Internals [Unofficial] April 20, 2026
Source
This is an idea I wrote up while working with a self-written large crate with a number of internal sub APIs in modules. Hopefully it makes sense. Any feedback is welcome, but I mainly want to see if other people have felt this pain point, if the approach seems reasonable to people for the Rust philosophy, and if I'm somehow treading over previous attempts to do something similar. I'm happy to address the semantics further, but I wanted to get this high-level feedback before spending major effort refining the write up. Also, this is my first attempt at anything in the realm of Rust RFCs, so be a little kind . (Posting as a link to github, as there is a limit of 5 links for new users) Permalink

Discussion in the ATmosphere

Loading comments...