server_native 0.1.7
server_native: ^0.1.7 copied to clipboard
Rust-backed transport boot APIs for Dart HTTP servers.
Changelog #
All notable changes to server_native will be documented in this file.
0.1.7 - 2026-08-26 #
- Keep detached request leases active until the detached transport closes, preserving graceful-shutdown accounting for upgraded and tunneled requests.
- Publish the matching prebuilt native assets under
server-native-prebuilt-v0.1.7.
0.1.6 - 2026-08-26 #
- Preserve an HTTP request's
Connection: closesemantics even when a framework tries to enable persistent connections on the response. - Finish an already-started streamed response cleanly when its handler fails, avoiding an invalid second response frame.
- Add a Relic compatibility regression covering raw HTTP/1.1 connection shutdown and response completion.
- Publish the matching prebuilt native assets under
server-native-prebuilt-v0.1.6.
0.1.5 - 2026-08-26 #
- Return a generic internal-server-error body when a native handler fails, while retaining the detailed failure in server-side logs.
- Scope graceful-shutdown accounting to individual requests so detached upgrades cannot consume another request's drain lease.
- Ensure forced shutdown does not wait for unconsumed single-subscription request bodies.
- Validate framework compatibility filters and skip native asset work when code assets are disabled.
- Consolidate TLS proxy startup options so the native crate passes strict Clippy checks without suppressions.
- Publish the matching prebuilt native assets under
server-native-prebuilt-v0.1.5.
0.1.4 - 2026-08-26 #
-
Fix forceful native shutdown so in-flight frontend requests are terminated at the transport boundary instead of receiving a synthetic 502 response.
-
Keep detached and upgraded connections visible to
connectionsInfo()while allowing graceful shutdown to drain ordinary requests independently. -
Close detached socket pairs without waiting on peers that stopped reading, preventing graceful shutdown deadlocks and callback teardown races.
-
Keep bridge response byte accounting consistent when responses are populated through
addStream. -
Publish the matching prebuilt native assets under
server-native-prebuilt-v0.1.4. -
Updated the native asset toolchain to
code_assets2.0,hooks2.2,ffi2.2, and Relic 1.2. -
Replaced the Rust hook builder with a manifest-driven
native_prebuiltrecipe, keeping source builds and verified release prebuilts on one path. -
Kept
ffigenat 20.1.1 because the currentffigen21 hook is not compatible with thecode_assets2 API. -
Removed the Serinus benchmark and framework-compatibility target because the upstream repository no longer provides the expected
server_nativeentry point. -
Refreshed the Relic compatibility patch for the current upstream dependency layout.
0.1.3+1 - 2026-08-25 #
-
Reduced
shared: trueisolate scaling overhead by using one Tokio worker per shared native runtime and replacing the callback-mode hot polling loop with coalesced wakeups. -
Hardened direct callback and upgraded tunnel shutdown so in-flight callbacks cannot race native teardown and clients receive a clean WebSocket close.
-
Added Rust regression coverage for shared worker sizing, callback wakeup coalescing, and callback lifecycle shutdown.
-
Expanded public Dartdoc for the native, bridge, direct, secure, and multi-server APIs, including transport-selection and lifecycle guidance.
-
Added verified prebuilt-native metadata and streamlined native asset resolution for supported platforms.
-
Expanded native HTTP compatibility coverage for callbacks, headers, transfer encoding, and framework integrations.
-
Fixed native-callback direct frame handling in
server_boot_proxy_direct.dartto avoid routing single-frame direct requests through the stream path, improving shelf compatibility stability under repeated request/response cycles. -
Added loopback bind retry handling for transient dual-stack ephemeral
EADDRINUSEcollisions, including wrapped native bind error detection. -
Updated HTTP/3 integration CI to install a pinned static curl build with guaranteed HTTP/3 support and checksum verification, so HTTP/3 integration tests run deterministically instead of being skipped based on runner curl capabilities.
-
Fixed native shelf/relic compatibility for empty
Connectionheader values by preserving empty connection header semantics across sanitize/rewrite/bridge encoding paths. -
Fixed native response
contentLengthclose parity forHEAD,1xx,204, and304responses to matchdart:iobehavior. -
Added Rust and Dart regression coverage for empty/sanitized connection header preservation and
HEADcontent-length close behavior.
0.1.3 #
- Fixed native callback websocket tunnel stability by switching direct frame polling to a non-blocking fair scheduling loop.
- Added and expanded framework compatibility tooling (
tool/framework_compat.dart) and deterministic patch sets forshelf,relic, andserinus. - Added CI workflow for framework compatibility coverage (
.github/workflows/server_native_framework_compat.yml). - Updated framework compatibility CI to build the local Rust native library before native-mode runs (instead of relying on downloaded prebuilts).
- Fixed framework compatibility CI artifact upload path so per-matrix JSON reports are always collected.
- Added
relicA/B parity regression coverage for transfer-encoding handling, websocket ping interval behavior, graceful close, malformed host/url handling, andconnectionsInfo. - Added native transfer-encoding regression tests to lock behavior across lenient
GET/HEADand chunked edge-cases. - Improved
HttpRequestURI reconstruction and malformed-target handling parity withdart:io. - Improved bridge-mode
HttpRequest/HttpResponsecompatibility across default headers, streaming start timing, and detach/hijack flows. - Stabilized native callback detach/hijack handling and direct stream lifecycle cleanup under shutdown and tunnel-close races.
- Updated compatibility harness to target upstream
serinusmainbranch and refreshed theserinuscompat patch accordingly.
0.1.2 #
- Split large Dart runtime files into focused modules for server boot, proxy runtime, direct path, and bridge codec/request/response layers.
- Added extensive Dart and Rust internal documentation across hot-path runtime code and protocol helpers.
- Fixed
NativeMultiServer.bindto consistently forward thehttp2flag. - Fixed
NativeHttpServer.connectionsInfo()tracking in native callback mode by wiring request/socket lifecycle counters on the direct callback path. - Added callback-free direct frame polling mode for native direct transport to avoid Rust->Dart callback teardown races.
- Fixed
NativeHttpServer.close(force: true)shutdown hangs by cancelling active Rust connection tasks during shutdown. - Added explicit regression tests for
NativeHttpServer.close(force: true)in both bridge and native-callback modes. - Reduced runtime log noise by silencing expected shutdown cancellation/tunnel teardown messages by default.
- Added
server_native.verbose_logstoggle for opt-in verbose runtime diagnostics (including non-TLS HTTP/3 downgrade notices). - Split native binary publishing to dedicated prebuilt release tags (
server-native-prebuilt-v*) independent from Dart package tags. - Updated
server_native:setupto resolve latest prebuilt-specific release tags instead of generic repository latest release. - Added generated prebuilt release metadata (
lib/src/generated/prebuilt_release.g.dart) sourced frompubspec.yamlversion. - Updated hooks/setup to use versioned prebuilt paths (
.dart_tool/server_native/prebuilt/<tag>/<platform>/) with legacy path fallback. - Updated prebuilt CI workflow to auto-derive release tags from package version when no tag input is provided.
- Removed
save_to_repoprebuilt commit path from CI to avoid drift from release source-of-truth. - Updated hook prebuilt lookup priority to prefer downloaded versioned prebuilts over packaged fallback binaries.
- Switched setup/hook cache path from
.prebuilt/...to.dart_tool/server_native/prebuilt/.... - Removed checked-in native prebuilt binaries from the repository; GitHub binary releases are now the source-of-truth.
- Added hook-level prebuilt auto-download from versioned GitHub release assets when no local prebuilt is found.
- Regenerated
native/bindings.handlib/src/ffi.g.dartto keep generated FFI artifacts in sync with native source updates.
0.1.1 #
- Reduced packaged prebuilt binary sizes for pub.dev publish limits.
- Updated prebuilt CI flow to strip artifacts and skip
ios-sim-x64in repo prebuilts.
0.1.0 #
- Initial release of
server_native. - Added
NativeHttpServerwithHttpServer-style bind/loopback APIs. - Added multi-bind helpers:
NativeMultiServerandNativeServerBind. - Added native callback and direct-request server modes.
- Added framework and transport benchmark harnesses and documentation.