Development
Vidarax is a Rust workspace with a TypeScript SDK, a Vue 3 UI, and a SpacetimeDB module beside it.
Workspace layout
Section titled “Workspace layout”crates/ vidarax-core/ Lock-free primitives, gate engine, ingest pipeline vidarax-contracts/ Shared model contracts and error mapping vidarax-api/ Axum HTTP server, handlers, WHIP, security vidarax-cli/ CLI toolingui/ Vue 3 frontendpackages/vidarax-sdk/ TypeScript SDKspacetime-module/ SpacetimeDB server moduledocs/ Architecture docs, runbooks, specsdeploy/ Docker, compose, certificatesscripts/ Benchmarks, smoke tests, release gatesschemas/ JSON Schemas for frame metadata and processing configexamples/ SDK usage examplesBuild and test
Section titled “Build and test”Rust workspace:
cargo build --workspacecargo test --workspacecargo clippy --workspace --all-targetsAPI release build:
cargo build --release -p vidarax-apiUI:
cd uinpm installnpm run buildnpm run test:e2eSDK:
cd packages/vidarax-sdknpm installnpm run buildnpm testLive tests need the matching local services: a VLM backend such as vLLM or SGLang for inference, ffmpeg and ffprobe on PATH for decode, and SpacetimeDB when running the module or the parity tests that depend on it.
Before shipping, run the release gates described in Operations.
Contributing basics
Section titled “Contributing basics”Changes are reviewed before merge. Keep changes scoped, and include the command output or the failure reason for the checks you ran.
Comments should explain invariants, constraints, or non-obvious decisions, not narrate line-by-line behavior. Performance claims in code or docs must come with the benchmark setup and input data that produced them.
The project has an explicit concurrency and memory policy for hot paths:
- Favor lock-free and wait-free structures on hot paths; if a lock is unavoidable, document why lock-free was rejected and what the contention model is.
- Prefer bounded FIFO, SPSC, and MPSC queues with explicit backpressure.
- Avoid per-frame heap allocation in the core ingest and gate loops; pre-allocate for throughput pipelines. Any new hot-path allocation needs explicit justification and measurement.
When weighing a change, the project’s ordered checklist applies: avoid the work entirely, do it once, do it fewer times, approximate safely, use a lookup table or bounded queue, constrain the problem, delete dead code, and only then reach for vectorization. Back decisions with data.