hls-runtime 0.5.0

Sans-IO Low-Latency HLS (RFC 8216bis) client + server engines in one crate (blocking reload, part prefetch, rolling-window origin), with an optional tokio+reqwest IO adapter.
Documentation
[package]
name         = "hls-runtime"
version      = "0.5.0"
edition      = "2024"
description  = "Sans-IO Low-Latency HLS (RFC 8216bis) client + server engines in one crate (blocking reload, part prefetch, rolling-window origin), with an optional tokio+reqwest IO adapter."
license      = "MIT OR Apache-2.0"
authors      = ["Alex Fishlock <alex.fishlock@racingjag.com>"]
keywords     = ["hls", "llhls", "sans-io", "streaming", "client"]
categories   = ["multimedia", "network-programming", "parser-implementations"]
repository   = "https://github.com/fishloa/rust-broadcast"
readme       = "README.md"
rust-version = "1.86"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
broadcast-common = { path = "../broadcast-common", version = "9", default-features = false }
transmux          = { path = "../transmux", version = "0.23", default-features = false }
# HLS (M3U8) playlist syntax (issue #878): the client/origin engines parse
# and render playlists via this crate directly rather than through `transmux`.
broadcast-hls     = { path = "../broadcast-hls", version = "0.1", default-features = false }
thiserror         = { version = "2", default-features = false }
serde             = { version = "1", optional = true, default-features = false, features = ["derive", "alloc"] }
# Only pulled in by the `std` feature: `server::engine::HlsOrigin` renders
# from a `media_plane::Trunk` (plan step 4) — the shared sample/segment/
# event/live-part ring `Trunk` is itself `std`-only (see its own module doc),
# so this crate's `server` module inherits the same `std` gate `MediaStore`
# used to. `bytes` is needed directly (not just transitively) because
# `Trunk::part_bytes`/`SegmentEntry::bytes` hand back `bytes::Bytes` this
# crate's own types carry forward (e.g. `HlsBody::Resource`).
media-plane       = { path = "../media-plane", version = "0.3", optional = true, default-features = false }
bytes             = { version = "1", optional = true, default-features = false }
# Only pulled in by the `tokio` feature (issue #717 slice 5) — the sans-IO
# core (`client/engine.rs`) never depends on either.
tokio             = { version = "1", optional = true, default-features = false, features = ["time"] }
reqwest           = { version = "0.12", optional = true, default-features = false, features = ["rustls-tls"] }
# Only pulled in by the `tokio` feature: `TokioClient`'s Digest challenge/
# response (reqwest itself only has Basic/Bearer helpers) delegates to the
# same shared model `rtsp-runtime` and `multimux`'s HTTP input adapters use
# (issue #663 P3b/P3c) — see `client::tokio_client`'s module doc.
broadcast-auth    = { path = "../broadcast-auth", version = "0.2", optional = true }

[features]
default = ["std"]
# `std` links the standard library. Without it the crate is `#![no_std]` and
# needs only `alloc` — the sans-IO scheduler/fetch/output state machine itself
# never touches a socket or a clock, so it does not need `std` at all; this
# feature exists only to match the workspace's `no_std`-capable-core convention
# (verified by the `--no-default-features` gate) and to let `transmux/std`
# follow along when a caller does want `std`.
std = ["broadcast-common/std", "thiserror/std", "transmux/std", "broadcast-hls/std", "media-plane/std", "dep:bytes"]
# Derive serde on the public wire/event types (`Action`, `Output`, `ResourceId`, ...).
serde = ["dep:serde"]
# `TokioClient` (issue #717 slice 5): an async shell driving the sans-IO
# `HlsClient` core over real HTTP (tokio + reqwest/rustls). NOT default —
# the core (`client/engine.rs`) stays IO-free regardless of this feature;
# enabling it only adds the `client::tokio_client` module alongside it.
tokio = ["std", "dep:tokio", "dep:reqwest", "dep:broadcast-auth"]