hyperlane-core 23.4.0

A lightweight, high-performance, and cross-platform Rust HTTP server library built on Tokio. It simplifies modern web service development by providing built-in support for middleware, WebSocket, Server-Sent Events (SSE), and raw TCP communication. With a unified and ergonomic API across Windows, Linux, and MacOS, it enables developers to build robust, scalable, and event-driven network applications with minimal overhead and maximum flexibility.
Documentation
/// Maximum number of reusable TLS record buffers kept per worker thread.
pub(crate) const MAX_POOLED_TLS_BUFFERS: usize = 64;

/// Initial byte size of pooled TLS incoming/outgoing record buffers (fits one max 16 KiB TLS record + overhead).
pub(crate) const TLS_RECORD_BUFFER_SIZE: usize = 18 * 1024;

/// Maximum incoming ciphertext buffer growth allowed during handshake or record framing.
pub(crate) const TLS_MAX_INCOMING_BUFFER: usize = 64 * 1024;

/// Maximum outgoing ciphertext buffer growth allowed before failing a stalled connection.
pub(crate) const TLS_MAX_OUTGOING_BUFFER: usize = 256 * 1024;

/// Maximum plaintext bytes encrypted into a single TLS record.
pub(crate) const TLS_MAX_PLAINTEXT_CHUNK: usize = 16 * 1024;

/// Size of the uninitialized stack buffer used for zero-pool single-record TLS reads.
pub(crate) const TLS_STACK_READ_BUF_SIZE: usize = 4 * 1024;

/// Failure reported if the TCP socket accepts no bytes during TLS transmission.
pub(crate) const TLS_TRANSMIT_WRITE_ZERO: &str = "tcp write zero during tls transmit";

/// Size of the stack buffer used to encrypt small TLS writes without borrowing the buffer pool.
pub(crate) const TLS_STACK_WRITE_BUF_SIZE: usize = 576;

/// Maximum consecutive empty TLS application-data records tolerated before rejecting the peer.
pub(crate) const TLS_MAX_EMPTY_APP_RECORDS: usize = 32;

/// Failure reported if a peer floods consecutive empty TLS application-data records.
pub(crate) const TLS_EMPTY_RECORDS_EXCEEDED: &str = "tls empty application records exceeded";

/// Failure reported if the outgoing TLS ciphertext buffer exceeds its safety bound.
pub(crate) const TLS_OUTGOING_BUFFER_EXCEEDED: &str = "tls outgoing buffer exceeds limit";

/// Maximum plaintext length encrypted through the stack fast path in [`TlsTransport`].
pub(crate) const TLS_STACK_WRITE_PLAINTEXT_CAP: usize = 512;

/// Failure reported if the TLS peer closes TCP without sending a `close_notify` alert.
pub(crate) const TLS_PEER_CLOSED_WITHOUT_CLOSE_NOTIFY: &str =
    "tls peer closed connection without close_notify";