0.3.0 • Published 2 months ago
@sp8d/core v0.3.0
@sp8d/core
Ultra-low-latency, memory-safe message channels for browser and worker concurrency. Designed for AI/data science copilots needing secure, lossless, and high-throughput communication with comprehensive safety guarantees.
What is @sp8d/core?
- Memory-Safe: Comprehensive bounds checking and buffer validation prevent corruption
- Race-Condition Free: Atomic operations and CAS-based pointer management ensure correctness
- Lock-Free Channels: High-performance browser/worker concurrency without blocking
- Zero Message Loss: Robust protocol with automatic fault recovery and slot reclamation
- Production Ready: Extensively tested with security hardening and protocol validation
- TypeScript-First: Full type safety with ESM output for modern applications
Local Development (from this package)
Use these scripts for local development only (from this directory):
- Build:
npm run build
For full builds, tests, and E2E/CI, use the monorepo root scripts below.
Monorepo Build & Test (from the root)
- Build only core:
npm run core:build # (from the monorepo root)
- Test only core:
npm run core:test # (from the monorepo root)
- Build all packages:
npm run build # (from the monorepo root)
- Test all packages:
npm run test # (from the monorepo root)
See the root README for more details and the latest script names.
Documentation
For API, advanced usage, and guides, see the SP8D Documentation Site.
Quick Start
import { createChannel } from "@sp8d/core";
const { channel, buffer } = createChannel({ slots: 32, slotSize: 64 });
// channel.send(), channel.recv(), etc.
See Also
- @sp8d/diagnostics: Live stats, slot state, protocol correctness
- @sp8d/harness: E2E test harness and diagnostics dashboard
- Full documentation