Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
526 changes: 378 additions & 148 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exclude = ["examples", "tests", "plugins"]
streamkit-core = { version = "0.1", path = "crates/core" }
streamkit-nodes = { version = "0.1", path = "crates/nodes" }
streamkit-engine = { version = "0.1", path = "crates/engine" }
streamkit-server = { version = "0.1", path = "apps/skit" }
streamkit-server = { version = "0.2", path = "apps/skit" }
streamkit-client = { version = "0.1", path = "apps/skit-cli" }
streamkit-api = { version = "0.1", path = "crates/api" }
streamkit-plugin-wasm = { version = "0.1", path = "crates/plugin-wasm" }
Expand All @@ -28,8 +28,8 @@ streamkit-plugin-sdk-native = { version = "0.1", path = "sdks/plugin-sdk/native"

tracing = "0.1.44"

tokio = "1.48"
tokio-util = "0.7"
tokio = "1.49"
tokio-util = "0.7.18"

async-trait = "0.1.89"
thiserror = "2.0"
Expand All @@ -39,9 +39,9 @@ bytes = "1.11.0"
futures = "0.3.31"

serde = { version = "1.0.228", features = ["derive", "rc"] }
serde-saphyr = "0.0.11"
serde-saphyr = "0.0.15"
serde_json = "1.0"
indexmap = { version = "2.12", features = ["serde"] }
indexmap = { version = "2.13", features = ["serde"] }

opentelemetry = "0.31.0"

Expand Down
10 changes: 5 additions & 5 deletions apps/skit-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ path = "src/main.rs"
streamkit-api = { workspace = true }

# For building the command-line interface
clap = { version = "4.5.53", features = ["derive"] }
clap = { version = "4.5.54", features = ["derive"] }

# For HTTP client functionality
reqwest = { version = "0.12", features = ["multipart", "stream", "json"] }
reqwest = { version = "0.13", features = ["multipart", "stream", "json"] }
# For WebSocket client
tokio-tungstenite = { version = "0.28.0", features = ["native-tls"] }
url = "2.5.7"
url = "2.5.8"

# For async runtime
tokio = { workspace = true, features = ["full"] }
Expand All @@ -48,9 +48,9 @@ serde_json = "1.0"
uuid = { version = "1.19", features = ["v4"] }

# For load testing
toml = "0.9"
toml = "0.9.11"
rand = "0.9"
tokio-util = "0.7"
tokio-util = "0.7.18"
anyhow = "1.0"
serde = { workspace = true }

Expand Down
30 changes: 15 additions & 15 deletions apps/skit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "streamkit-server"
authors = ["Claudio Costa <cstcld91@gmail.com>", "StreamKit Contributors"]
repository = "https://github.com/streamer45/streamkit"
license = "MPL-2.0"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
publish = false

Expand All @@ -25,7 +25,7 @@ streamkit-plugin-wasm = { workspace = true }
streamkit-plugin-native = { workspace = true }

# For building the command-line interface
clap = { version = "4.5.53", features = ["derive"] }
clap = { version = "4.5.54", features = ["derive"] }

# For layered configuration management
figment = { version = "0.10.19", features = ["toml", "env"] }
Expand All @@ -34,10 +34,10 @@ figment = { version = "0.10.19", features = ["toml", "env"] }
serde = { workspace = true, features = ["derive"] }
serde-saphyr = { workspace = true }
serde_json = "1.0"
schemars = "1.1.0"
schemars = "1.2.0"

# For serializing the default config into TOML format
toml = "0.9"
toml = "0.9.11"

# For structured logging
tracing = { workspace = true }
Expand All @@ -48,21 +48,21 @@ anyhow = "1.0"
# For HTTP server
axum = { version = "0.8", features = ["multipart", "ws"] }
tokio = { workspace = true, features = ["full"] }
tower = "0.5"
tower = "0.5.3"
tower-http = { version = "0.6", features = ["cors", "trace", "fs", "set-header"] }
tokio-stream = "0.1"
tokio-stream = "0.1.18"
hyper = { version = "1.8", features = ["full"] }
axum-server = { version = "0.8", features = ["tls-rustls"] }
rustls = { version = "0.23", features = ["ring"] }
reqwest = { version = "0.12", features = ["multipart", "json"] }
rustls = { version = "0.23.36", features = ["ring"] }
reqwest = { version = "0.13", features = ["multipart", "json"] }
bytes = { workspace = true }
futures = { workspace = true }
uuid = { version = "1.19", features = ["v4", "serde"] }
http-body-util = "0.1"
multer = "3.1"

# For embedding static files
rust-embed = "8.9"
rust-embed = "8.11"
mime_guess = "2.0"

# For OpenTelemetry OTLP integration
Expand All @@ -86,7 +86,7 @@ sysinfo = "0.37.2"

# For tokio-console debugging (optional)
console-subscriber = { version = "0.5", optional = true }
time = { version = "0.3.44", features = ["formatting"] }
time = { version = "0.3.45", features = ["formatting"] }

# For CPU profiling (optional)
# Uses frame-pointer unwinding for much faster stack traces (vs libunwind)
Expand All @@ -108,7 +108,7 @@ jemalloc_pprof = { version = "0.8", features = ["symbolize"], optional = true }
dhat = { version = "0.3", optional = true }

# MoQ support (optional)
moq-native = { version = "0.10.1", optional = true }
moq-native = { version = "0.11.0", optional = true }
async-trait = { workspace = true }

# For glob pattern matching in permissions
Expand All @@ -124,7 +124,7 @@ getrandom = "0.3"
aws-lc-rs = "1"

# For MoQ auth path matching (optional, with moq feature)
moq-lite = { version = "0.10", optional = true }
moq-lite = { version = "0.11.0", optional = true }

[features]
default = ["script"]
Expand All @@ -137,12 +137,12 @@ moq = ["dep:moq-native", "dep:moq-lite"]
script = ["streamkit-nodes/script", "streamkit-engine/script"]

[dev-dependencies]
tokio-test = "0.4"
tokio-test = "0.4.5"
tokio-tungstenite = "0.28"
futures-util = "0.3"
ogg = "0.9.2"
opus = "0.3"
tempfile = "3.23"
opus = "0.3.1"
tempfile = "3.24"
urlencoding = "2.1"

[lints.rust]
Expand Down
94 changes: 94 additions & 0 deletions apps/skit/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// SPDX-FileCopyrightText: © 2025 StreamKit Contributors
//
// SPDX-License-Identifier: MPL-2.0

// Build scripts communicate with Cargo via stdout (`cargo:` directives).
// Allow `println!` here to emit those directives.
#![allow(clippy::disallowed_macros)]

use std::{
env, fs,
path::{Path, PathBuf},
process::Command,
};

fn main() {
println!("cargo:rerun-if-env-changed=SKIT_BUILD_HASH");
println!("cargo:rerun-if-env-changed=GIT_SHA");
println!("cargo:rerun-if-env-changed=GITHUB_SHA");

let git_head = find_git_head();
if let Some(head_path) = git_head.as_ref() {
println!("cargo:rerun-if-changed={}", head_path.display());

if let Ok(head_ref) = fs::read_to_string(head_path) {
if let Some(reference) = head_ref.trim().strip_prefix("ref: ") {
if let Some(repo_root) = head_path.parent().and_then(|dir| dir.parent()) {
let ref_path = repo_root.join(reference);
println!("cargo:rerun-if-changed={}", ref_path.display());
}
}
}
}

let hash = read_env_hash("SKIT_BUILD_HASH")
.or_else(|| read_env_hash("GIT_SHA"))
.or_else(|| read_env_hash("GITHUB_SHA"))
.or_else(|| {
git_hash(git_head.as_ref().and_then(|path| path.parent()).and_then(|p| p.parent()))
})
.unwrap_or_else(|| "unknown".to_string());

println!("cargo:rustc-env=SKIT_BUILD_HASH={hash}");
}

fn read_env_hash(var: &str) -> Option<String> {
let value = env::var(var).ok()?;
let trimmed = value.trim();
if trimmed.is_empty() {
None
} else {
Some(trimmed.to_string())
}
}

fn git_hash(repo_root: Option<&Path>) -> Option<String> {
let mut command = Command::new("git");
command.args(["rev-parse", "HEAD"]);

if let Some(root) = repo_root {
command.current_dir(root);
}

let output = command.output().ok()?;

if !output.status.success() {
return None;
}

let hash = String::from_utf8(output.stdout).ok()?;
let trimmed = hash.trim();
if trimmed.is_empty() {
None
} else {
Some(trimmed.to_string())
}
}

fn find_git_head() -> Option<PathBuf> {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").ok()?;
let mut dir = PathBuf::from(manifest_dir);

loop {
let head_path = dir.join(".git").join("HEAD");
if head_path.exists() {
return Some(head_path);
}

if !dir.pop() {
break;
}
}

None
}
12 changes: 11 additions & 1 deletion apps/skit/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,15 @@ async fn profile_heap_handler(
crate::profiling::profile_heap().await
}

fn build_hash() -> &'static str {
option_env!("SKIT_BUILD_HASH").unwrap_or("unknown")
}

async fn health_handler() -> impl IntoResponse {
Json(serde_json::json!({
"status": "ok",
"version": env!("CARGO_PKG_VERSION"),
"build_hash": build_hash(),
}))
}

Expand Down Expand Up @@ -2291,7 +2296,12 @@ fn start_moq_webtransport_acceptor(
match moq_config.init() {
Ok(mut server) => {
// Store fingerprints in gateway for HTTP endpoint
let fingerprints = server.fingerprints().to_vec();
let fingerprints = server
.tls_info()
.read()
.unwrap_or_else(std::sync::PoisonError::into_inner)
.fingerprints
.clone();
gateway.set_fingerprints(fingerprints.clone()).await;

for (i, fp) in fingerprints.iter().enumerate() {
Expand Down
8 changes: 4 additions & 4 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ categories = ["multimedia", "network-programming"]
readme = "README.md"

[dependencies]
tokio = { version = "1.48", features = ["sync", "macros"] }
tokio-util = "0.7"
tokio = { version = "1.49", features = ["sync", "macros"] }
tokio-util = "0.7.18"

async-trait = "0.1.89"

serde = { version = "1.0.228", features = ["derive", "rc"] }
serde_json = "1.0"
schemars = { version = "1.1.0", features = ["derive"] }
schemars = { version = "1.2.0", features = ["derive"] }
ts-rs = { version = "11.1.0", features = ["serde-json-impl"] }

bytes = "1.11.0"
Expand All @@ -31,4 +31,4 @@ tracing = "0.1.44"
thiserror = "2.0"

[dev-dependencies]
tokio = { version = "1.48", features = ["sync", "macros", "rt-multi-thread", "time"] }
tokio = { version = "1.49", features = ["sync", "macros", "rt-multi-thread", "time"] }
29 changes: 15 additions & 14 deletions crates/nodes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ tracing = { workspace = true }

# For OpenTelemetry OTLP integration
opentelemetry = { workspace = true, features = ["metrics", "trace"] }
schemars = { version = "1.1.0", features = ["derive"], optional = true }
schemars = { version = "1.2.0", features = ["derive"], optional = true }

# For the mixer's concurrent input handling
futures = { workspace = true }

# --- Optional Dependencies ---
# These are only included if their corresponding feature is enabled.
ogg = { version = "0.9.2", optional = true, features = ["async"] }
opus = { version = "0.3", optional = true }
url = { version = "2.5.7", optional = true, features = ["serde"] }
rquickjs = { version = "0.10", features = ["array-buffer", "futures", "loader", "parallel"], optional = true }
opus = { version = "0.3.1", optional = true }
url = { version = "2.5.8", optional = true, features = ["serde"] }
rquickjs = { version = "0.11", features = ["array-buffer", "futures", "loader", "parallel"], optional = true }
wildmatch = { version = "2.6", optional = true }

moq-transport = { version = "0.12.1", optional = true }
moq-native = { version = "0.10.1", optional = true }
moq-lite = { version = "0.10.1", optional = true }
hang = { version = "0.9.1", optional = true }
moq-native = { version = "0.11.0", optional = true }
moq-lite = { version = "0.11.0", optional = true }
hang = { version = "0.10.0", optional = true }

# For local dev, debugging moq stuff
# moq-transport = { version = "0.11.0", optional = true }
Expand All @@ -58,13 +58,14 @@ hang = { version = "0.9.1", optional = true }
# hang = { path = "../../moq/rs/hang", optional = true }

serde_json = { version = "1.0", optional = true }
reqwest = { version = "0.12", optional = true, default-features = false, features = [
"rustls-tls",
reqwest = { version = "0.13", optional = true, default-features = false, features = [
"rustls",
"stream",
] }
tempfile = { version = "3", optional = true }
tempfile = { version = "3.24", optional = true }
uuid = { version = "1", optional = true, features = ["v4"] }
rubato = { version = "0.16", optional = true }
rubato = { version = "1.0", optional = true }
audioadapter-buffers = { version = "2.0", optional = true }
symphonia = { version = "0.5.5", optional = true, default-features = false, features = [
"mp3",
"wav",
Expand Down Expand Up @@ -98,7 +99,7 @@ default = [
passthrough = ["dep:schemars"]
audio_gain = ["dep:schemars"]
audio_mixer = ["dep:schemars", "dep:serde_json"]
audio_resampler = ["dep:schemars", "dep:rubato"]
audio_resampler = ["dep:schemars", "dep:rubato", "dep:audioadapter-buffers"]
audio_pacer = ["dep:schemars"]
file_io = ["dep:schemars"]
pacer = ["dep:schemars"]
Expand All @@ -122,9 +123,9 @@ webm = ["dep:webm", "dep:schemars"]
symphonia = ["dep:symphonia", "dep:schemars"]

[dev-dependencies]
tempfile = "3"
tempfile = "3.24"
axum = "0.8"
tower = "0.5"
tower = "0.5.3"

[lints]
workspace = true
Loading
Loading