API stability

Nacelle is pre-1.0, but the 0.3 line distinguishes supported opt-in APIs from explicitly experimental features. See Versioning and support for the release promotion process and supported minor-version window.

Stable enough for prototype integrations:

  • nacelle::core::pipeline typed context, responder, and handler contracts
  • nacelle::tcp and nacelle::http transport-owned request/response contracts
  • nacelle::core::NacelleBody
  • nacelle::core::{NacelleLimits, NacelleRuntimeState}
  • nacelle::NacelleApp listener registration and NacelleApp::run(...)
  • nacelle::prelude::* for common application imports
  • nacelle::core::{NacelleTelemetry, NacelleTelemetryConfig, NacelleRequestMetrics, NacelleTelemetryDiagnostics}
  • nacelle::core::NacelleTelemetryObserver for statically dispatched application telemetry
  • the phase-timing feature and its documented low-cardinality phase schema
  • the error-hints feature and NacelleError::hint() method

Experimental:

  • Linux thread-per-core execution behind experimental-thread-per-core
  • plaintext/OpenSSL detection behind experimental-openssl-detection
  • stress tooling config

TCP body-timeout migration

The 0.4 development line changes TCP request-body timeouts from a fresh NacelleTcpLimits::read_timeout for each read to one absolute deadline for the remaining body. Buffered and streaming bodies share this policy; streaming channel waits count toward the deadline. The default remains 30 seconds. Regular progress no longer extends body processing: a body taking more than 30 seconds can now fail with NacelleTimeoutReason::RequestBodyRead even if every individual read takes less than 30 seconds.

Set with_read_timeout(...) to a budget that covers the complete body and streaming backpressure for the expected workload. Use without_read_timeout() only when an unbounded active-read policy is intentional. The body deadline is independent of the handler and idle deadlines; disabling handler timeouts does not disable body expiry.

Telemetry configuration migration

The 0.4 development line replaces NacelleRequestMetricsConfig and its five per-series booleans with NacelleRequestMetrics::{Off, Counters, CountersAndBytes}. Request duration, labelled request in-flight, and TCP phase timing move to NacelleTelemetryDiagnostics. Use with_request_metrics(...) and with_diagnostics(...); the superseded per-switch builder methods are removed rather than retained as aliases.

The stress server likewise replaces top-level byte_metrics and phase_duration_metrics with a strict [telemetry] table. Its CLI uses --request-metrics, --request-duration-metrics, --request-in-flight-metrics, and --tcp-phase-duration-metrics. Removed TOML keys and CLI flags fail as unknown configuration instead of silently falling back.

Features prefixed with experimental- are default-off and use at your own risk. They are not part of the supported 0.3 contract and may change or be removed in a future minor release. NacelleError::hint() is supported, but its returned text is advisory operator guidance: do not parse it or treat it as a stable error identifier. Match NacelleError::ResourceLimit with NacelleResourceLimitReason, or NacelleError::Timeout with NacelleTimeoutReason, instead. Both reason enums are non-exhaustive; include a wildcard arm. Their as_str() methods return stable low-cardinality telemetry labels. Applications may use Other(&'static str) for their own static, bounded reason vocabulary.

Application code should use the app-first path: NacelleApp::new().tcp(...).http(...).run().await. The app owns shared runtime state, telemetry, shutdown, and listener supervision. Concrete transport servers retain transport-specific limits and policy. nacelle::runtime::NacelleHost and lower-level server APIs remain available for advanced manual supervision.

Public exports marked #[doc(hidden)] are internal composition plumbing. They exist so the facade can coordinate one process-wide drain deadline, runtime state, telemetry instance, and application-state binding across concrete transport crates. They are not part of the supported 0.3 API contract, even though Rust visibility permits direct use. Applications should use the visible app, host, server, or listener methods instead. Removing or changing a hidden export does not require a 0.3 compatibility shim.

Use NacelleApp::with_state(...) when handlers need application dependencies. The app shares one typed root internally through Arc, while handlers borrow &AppState from RequestContext::app_state(). Mutable access, dynamic type maps, and runtime replacement of the whole root are outside the contract.

Growth-prone connection metadata, ConnectionInfo, telemetry events and event kinds, and TCP/Unix listener option types are non-exhaustive. Consumers must include wildcard enum match arms and construct supported option values through new, Default, conversions, and with_* or without_* builders. NacelleTcpConfig and transport limit types follow the same builder-first rule so settings introduced by later releases retain their defaults.

The former detached NacelleRequest/NacelleResponse handler and Tower adapter were removed. Transport pipelines now remain strongly typed through completion; there is no compatibility adapter.

Before 1.0, minor releases may change defaults or builder methods when production safety requires it. After 1.0, public API changes should follow semver, with migration notes for config/default changes.

Peer limit migration

The peer-limits Cargo feature is default-off. Enable it to retain per-peer concurrent connection limits, connection-open rates, and HTTP request rates. Without it, the corresponding settings, APIs, and tracking state are not compiled. Global connection controls remain available with no extra feature.

The earlier 0.4 RC setter set_connection_open_rate is renamed set_peer_connection_open_rate. The setter still limits each IP independently. Both peer and global rate validation use NacelleConfigurationError::ConnectionOpenRate; global rates must be below usize::MAX, and peer rates must also fit u32. Use set_global_connection_open_rate for a budget across metered listeners sharing runtime state. See runtime limits.

Experimental memory removal

The 0.4 development line removes experimental-memory and its runtime memory accounting APIs. The formerly unconditional NacelleResourceLimitReason::{MemoryBytes, MemoryLimitMismatch} and NacelleTimeoutReason::MemoryAllocation variants are also removed, including their exports through nacelle_core::error and the crate root. Applications must stop matching those variants. Body, frame, connection, and request limits and streaming backpressure remain available; they are not a process memory cap.

The release compatibility gate in .github/scripts/check-public-api.sh accepts only these six variant removals in the two core provider comparisons against its pinned baseline. It retains the complete diff artifacts, rejects other core removals and changed items, and continues to deny removals and changes for every other compared surface. An accepted experimental removal does not authorize unrelated API breaks.

Unified TCP completion migration

TCP now uses one request type and handler for both responses and explicit silent completion. The separate one-way handler API has been removed. Protocol error replies are typed responses passed through the normal encoder rather than a separate encode_error hook. These are source-breaking changes; follow the TCP migration guide. HTTP retains its required-response contract.

Reference protocol migration

The former reference_protocol feature and its facade/prelude exports have moved to the unpublished examples/nacelle-reference-protocol workspace package. Repository examples depend on that package directly. Application code should implement nacelle::tcp::Protocol or maintain its protocol in a separate application crate rather than depending on a protocol implementation from the Nacelle facade.