Skip to content

Commit

Permalink
h3: allow the frame module to be public under a new feature (#1689)
Browse files Browse the repository at this point in the history
The quiche::h3::frame module is by default private because low-level
details are abstracted behind higher-layer APIs. However, for some
situations, such as testing, it can be helpful to have direct access
to frame types and their serialization/deserialization code.

This change adds a new 'internal' feature that when enables makes
the frame module public. There are no guarantees of API stability
for things exposed in this way.
  • Loading branch information
LPardue authored Dec 13, 2023
1 parent 3ecde62 commit 8e64c06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions quiche/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ fuzzing = []
# Build and expose the FFI API.
ffi = []

# Exposes internal APIs that have no stability guarantees across versions.
internal = []

[package.metadata.docs.rs]
no-default-features = true
features = ["boringssl-boring-crate", "qlog"]
Expand Down
4 changes: 4 additions & 0 deletions quiche/src/h3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6277,6 +6277,10 @@ mod tests {

#[cfg(feature = "ffi")]
mod ffi;
#[cfg(feature = "internal")]
#[doc(hidden)]
pub mod frame;
#[cfg(not(feature = "internal"))]
mod frame;
#[doc(hidden)]
pub mod qpack;
Expand Down

0 comments on commit 8e64c06

Please sign in to comment.