@moqtap/types
TypeScript interfaces mirroring moqtap Rust structs.
What it is
Section titled “What it is”@moqtap/types is an npm package containing TypeScript interfaces auto-generated from moqtap’s Rust structs via ts-rs. It defines the IPC contract between the Tauri backend and the Vue frontend.
Installation
Section titled “Installation”npm install @moqtap/typesimport type { TraceEvent, ControlMessage, QuicStats } from '@moqtap/types';
function handleEvent(event: TraceEvent) { console.log(`${event.direction} ${event.message.type}`);}Key types
Section titled “Key types”TraceEvent— a timestamped protocol eventControlMessage— union of all MoQT control message typesQuicStats— QUIC transport statisticsSessionState— connection lifecycle states
Versioning
Section titled “Versioning”Pinned to moqtap-client’s version. When moqtap-client releases 0.2.0, the same CI run publishes @moqtap/[email protected] to npm.
How it’s generated
Section titled “How it’s generated”Rust structs use #[derive(TS)] from the ts-rs crate. A CI step regenerates TypeScript files into packages/types/ in the moqtap monorepo. The generated files are checked into version control.