soyokaze 0.3.0

HTTP/1/2/3 Library Crate
Documentation

soyokaze.rs

HTTP/1/2/3 Library Crate

Overview

An HTTP/1/2/3 implementation written in Rust.

It uses BoringSSL for TLS handling, and the BoringSSL-based Quiche for QUIC handling.

C FFI and Python bindings are also available.

Requirements

  • Linux / macOS (x86_64, AArch64)
  • Rust 1.88+ (including dependencies, The crate itself is 1.85+)
  • CMake and C/C++ Toolchain (for building BoringSSL)

Installation

cargo add soyokaze

The C ABI ships as part of the same crate. Prebuilt shared and static libraries, plus the matching include/soyokaze.h, are attached to each release for Linux and macOS on x86_64 and aarch64 — or build them yourself with cargo build --release --lib.

The Python bindings in python/ wrap that same shared library through ctypes and are published on PyPI with the library bundled into the wheel:

uv pip install soyokaze

They locate the shared library through, in order: the SOYOKAZE_LIBRARY environment variable, the copy bundled with the package, the crate's own target/{release,debug} directory when run from within the repository, and the system loader.

Examples

examples/ holds the same program in each language: a server and a client in one process over loopback TCP, which needs no network access and no certificate.

cargo run --example loopback
cargo build --lib
cc -std=c11 -Iinclude examples/loopback.c -Ltarget/debug -lsoyokaze -o loopback
LD_LIBRARY_PATH=target/debug ./loopback  # DYLD_LIBRARY_PATH=target/debug on macOS
cd python && uv run examples/loopback.py

websocket_loopback.rs, websocket_loopback.c and python/examples/websocket_loopback.py do the same for a WebSocket echo server.

Development

cargo test
cargo bench
cargo +nightly fuzz run everything

The C ABI and Python bindings each have their own test suite. tests/ffi.c links against the shared library through the header the way an external C caller would, checked alongside tests/ffi.rs, which drives the same surface from Rust:

cargo build --lib
cc -std=c11 -Iinclude tests/ffi.c -Ltarget/debug -lsoyokaze -o ffi-test
LD_LIBRARY_PATH=target/debug ./ffi-test  # DYLD_LIBRARY_PATH=target/debug on macOS
cd python
uv run pytest

Links