refactor(core): replace wildcard re-exports with explicit lists#1270
Open
Greg Lamberson (glamberson) wants to merge 1 commit into
Open
Conversation
Convert each `pub use self::foo::*` in `crates/ironrdp-core/src/lib.rs` to an explicit list of items, so adding a new `pub` item to one of the nine modules requires a conscious lib.rs edit rather than being auto-public. This crate is explicitly designed to be the small low-context foundation for the workspace per ARCHITECTURE.md. Wildcards remove the "is this a public commitment?" review trigger and let every new pub fn slip into the API surface without scrutiny. Explicit lists make the public commitment visible at PR-review time. Net behavioural change: zero. Every item exported by the wildcards is still exported by name. Feature-flag gates on encode_buf (alloc), encode_vec (alloc or test), and WriteBuf (alloc) are preserved. Verification: cargo xtask check fmt | lints | locks | typos | tests all pass; cargo check -p ironrdp-core builds clean across all-features, no-default-features, and alloc-only; full workspace builds with helper,__bench features.
e1d8578 to
3dfe5a9
Compare
Greg Lamberson (glamberson)
added a commit
to lamco-admin/IronRDP
that referenced
this pull request
May 16, 2026
…root The wildcard `pub use server::*` re-export in lib.rs was replaced with an explicit list upstream (Devolutions#1270 wildcard cleanup, merged 2026-05-13). The CredentialValidator commit predated that change, so the rebase onto current master left the trait defined but not exported. Adds CredentialValidator to the explicit re-export list so downstream consumers (e.g., lamco-rdp-server/src/security/auth.rs) can resolve it via `ironrdp_server::CredentialValidator`. Folds into PR Devolutions#1172 when the fork retires.
Greg Lamberson (glamberson)
added a commit
to lamco-admin/IronRDP
that referenced
this pull request
May 16, 2026
Devolutions#1270 (wildcard cleanup) replaced `pub use server::*` with an explicit re-export list. This PR predates that change, so without an update the trait would be defined in server.rs but unreachable from downstream consumers via `ironrdp_server::CredentialValidator`. Adds CredentialValidator to the explicit list in lib.rs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
crates/ironrdp-core/src/lib.rscurrently re-exports each of its nine internal modules viapub use self::foo::*. This PR converts each wildcard to an explicit list of items.Why
ironrdp-coreis the foundational Core Tier crate. PerARCHITECTURE.md, it is intended to be small and contain only "low-context building blocks" so other crates can depend on it without compile-time cost. The wildcards work against that intent: every newpub fn,pub struct, orpub traitadded to any of the eight internal modules is automatically part ofironrdp-core's public API surface, with no review trigger asking whether it should be.Explicit lists make adding a new
pubitem a consciouslib.rsedit. The public commitment becomes visible at PR-review time.What changes
pub use self::as_any::*becomespub use self::as_any::AsAnypub use self::cursor::*becomes an explicit list of three structspub use self::decode::*becomes an explicit list of nine items (free fns + traits + types)pub use self::encode::*becomes an explicit list of eight items, plus cfg-gatedencode_buf(alloc) andencode_vec(alloc or test)pub use self::error::*becomes an explicit list of fourteen items (constructor fns + shape traits)pub use self::into_owned::*becomespub use self::into_owned::IntoOwnedpub use self::padding::*becomespub use self::padding::{read_padding, write_padding}#[cfg(feature = \"alloc\")] pub use self::write_buf::*becomes#[cfg(feature = \"alloc\")] pub use self::write_buf::WriteBufFeature-flag gates preserved exactly.
Behavioural change
None. Every item exported by the wildcards is still exported by name.
Diff
1 file, +24 / -9.
Verification
`cargo xtask check fmt | lints | locks | typos | tests` all pass. `cargo check -p ironrdp-core` builds clean under `--all-features`, `--no-default-features` (no_std), and `--no-default-features --features alloc`. Full workspace `cargo check --workspace --features helper,__bench` builds.