Sign in

    MoonbitHTTP

    Streaming HTTP protocol suite for MoonBit with HTTP/1.1, HTTP/2, HTTP/3, QUIC, TLS integration, and policy-driven transports.

    http
    http1
    http2
    http3
    quic
    tls
    networking
    Download zip
    Author
    Version
    0.7.0
    License
    Apache-2.0
    Last updated
    16 days ago
    Downloads
    73

    #Streaming HTTP protocol suite for MoonBit

    MoonbitHTTP provides portable HTTP/1.1, HTTP/2, HTTP/3, QUIC, TLS, streaming body, and policy building blocks for MoonBit. 0.7.0 is a breaking alpha architecture line; APIs may change before 1.0.0.

    The protocol packages are capability-free state machines. Network access, resolution, clocks, entropy, TLS, and authorization are supplied explicitly by the host. This keeps portable packages usable on Native, Wasm, Wasm-GC, and JavaScript without pretending that every target has the same network runtime.

    #Installation

    After the 0.7.0 package is published to Mooncakes, add it from a MoonBit project root with:

    moon add ZSeanYves/MoonbitHTTP@0.7.0

    For the current source checkout, clone the repository and use its pinned MoonBit toolchain; the repository's CI and release checks are the authoritative way to validate a checkout before publication.

    The package map and dependency boundaries are documented in docs/concepts/packages.md. Package-level API documentation is kept beside each package; generated .mbti files remain the canonical interface surface.

    #Packages

    • core/types, core/body, core/codec: HTTP values, streaming bodies, cancellation, backpressure, and bounded byte codecs.
    • protocol/http1, protocol/http2, protocol/http3, protocol/quic, protocol/tls: incremental framing and protocol state machines. These packages do not open sockets.
    • runtime/transport, runtime/service, runtime/detection: host capability contracts, protocol selection, HTTP/1 and HTTP/2 service lifecycle, and h2c.
    • application/client, application/server: request orchestration, pooling, and server dispatch contracts.
    • policy/auth, policy/cache, policy/cookie, policy/content_coding: opt-in HTTP policies.
    • adapter/native/*: Native TCP/UDP, resolver, clock, OpenSSL stream TLS and QUIC TLS adapters.
    • adapter/uv: callback-to-async Reader/Writer integration for a host runtime.

    #Features

    The RFC links describe the protocol contracts this implementation targets. They are not a claim that every optional extension or deployment profile is implemented.

    #Target support

    CapabilityNativeWasm / Wasm-GCJavaScript
    Core, codec, protocol, policyCompile and useCompile and useCompile and use
    HTTP/1.1 and HTTP/2 service interfacesAvailable through an adapterAvailable with host capabilitiesAvailable with host capabilities
    Native TCP/UDP/DNS/OpenSSL adaptersSupportedUnsupportedUnsupported
    HTTP/3/QUIC protocol stateCompile and use; Native driver fixturesCompile and use; host datagram/TLS requiredCompile and use; host datagram/TLS required
    HTTP/3 network TLSOpenSSL 3.5+ QUIC TLS providerHost suppliedHost supplied
    Browser fetch/WebSocket integrationNot applicableNot promisedNot promised

    “Compile and use” for a portable package does not grant network access. Wasm and JavaScript consumers must provide the required host capabilities and must not import adapter/native/*.

    #Examples

    Run these fixtures through the repository runners described in their package README files; they are verification programs, not deployment templates.

    #Standards and scope

    HTTP/1.1 and HTTP/2 have the broadest application coverage. HTTP/2 framing and HPACK target RFC 9113 and RFC 7541. HTTP/3 and QUIC currently provide protocol engines and driver actions; a general HTTP/3 client/server service is not promised by this release.

    Native TLS and QUIC require an explicitly selected provider. Wasm and JavaScript do not receive browser networking, DNS, UDP, or TLS automatically. The async runtime is cooperative, so host capabilities and application handlers must yield and keep cancellation cleanup bounded.

    #Validation status

    The repository runs strict Native, Wasm, Wasm-GC, and JavaScript checks, tests, architecture validation, Native TLS suites, HTTP/3/QUIC interoperability, and controlled Native performance/reference runs in CI. These are bounded development and loopback validations. They do not by themselves establish public-network capacity, long-duration reliability, cross-platform deployment coverage, or a complete independent security assessment.

    See docs/release/current.md for the current evidence summary, docs/release/gates.md for release conditions, and CHANGELOG.md for version history.

    #Caveats

    • 0.7.0 is an alpha architecture line with breaking package paths.
    • Native QUIC TLS requires OpenSSL 3.5 or newer.
    • HTTP/3 service orchestration, browser fetch/WebSocket adapters, and online OCSP retrieval are outside the current scope.
    • A portable build proves compilation for a target; it does not prove that the target supplies a usable network implementation.

    #License

    Apache License 2.0. See LICENSE.