Skip to content

Releases

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 01:05
1aee9f6

Changed

  • The package requires Zig 0.17. Zig 0.16 support is gone: minimum_zig_version
    is 0.17.0, the devshell is the 0.17 shell, and the version probes in
    build.zig are replaced by Run.addPassthruArgs. The public API and the
    frame behavior are unchanged.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 07:56
4a3eed1

Changed

  • The package builds on Zig 0.16 and 0.17 from one tree, and a consumer on
    either version can fetch it. The build script and Mask.apply use the forms
    both versions have: array multiplication is gone from the hot loop, and
    b.args, LazyPath.getPath, and b.getInstallPath are replaced. The
    zig-next devshell now runs the same tests through testingx as the default
    shell.
  • The baskingspot/http pin moves from v0.1.0 to v0.4.2, the first release
    that builds on both Zig versions. examples/http-echo.zig compiles against
    it unchanged.

Removed

  • examples/xev-echo.zig and the libxev dependency behind it. Zig resolves
    every dependency named in a manifest once any lazyDependency call is made,
    so a lazy dependency with no Zig 0.17 build stops a Zig 0.17 consumer before
    the root build script runs. A lazy dependency is still a dependency.
    examples/ holds four programs, and the frame layer never needed an event
    loop.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 02:11
79144c5

Added

  • server and client namespaces. Each re-exports the parser, the writer, and
    the close types for its role, so a program imports one and gets the frame
    rules that belong to it: a server unmasks what it reads and writes unmasked,
    a client does the reverse.
  • Parser, the streaming frame parser. feed takes the bytes read from the
    socket and returns .frame_header, .payload, .frame_end, or
    .need_more, with the count it consumed. It reads payload bytes in place,
    unmasks them in the buffer it was given, and holds no allocation.
  • FrameHandler, the message layer over Parser. It reassembles fragments
    and returns .data, .data_end, .ping, .pong, .close, or
    .need_more, with the 125-byte control payload kept in the handler itself.
  • MessageValidator, the RFC 6455 Section 5.4 fragmentation check as a
    separate value, for a caller that drives Parser and wants
    error.UnexpectedContinuation and error.ExpectedContinuation instead of
    tracking the state by hand.
  • writeFrame, writeClose, writePing, and writePong. client.writeFrame
    takes a mutable payload because RFC 6455 Section 5.3 makes it XOR the mask
    into the buffer before writing.
  • MessageWriter, which streams one message across frames with writeChunk
    and finish, as server.MessageWriter and client.MessageWriter.
  • FrameHeader.Buffer, the serialized header on its own for scatter-gather
    writes.
  • Mask, MaskKey, and client.generateMaskKey: the four-byte key,
    Mask.apply for masking or unmasking a chunk, and a key from
    std.crypto.random.
  • CloseCode, ClosePayload, and parseClosePayload: the RFC 6455 Section
    7.4 codes, plus a parser that rejects a one-byte payload and a code the
    wire forbids.
  • Extension and Extension.DeflateConfig: the permessage-deflate
    negotiation (RFC 7692), the RSV1 bit, and the compressed flag on a written
    frame. Deflate itself is the caller's library.
  • computeAcceptKey, UpgradeRequest, validateUpgradeRequest, and
    UpgradeResponse: the Sec-WebSocket-Accept value, the two WebSocket
    fields an upgrade request carries, their validation, and a complete 101
    response in a fixed buffer.
  • The Autobahn TestSuite passes 247 of 247 cases in its fast profile against
    the echo server, and that profile is a CI gate.