A TypeScript library that wraps the Web Serial API with a minimal,
RxJS-based session surface.
Public API (v2)
The v2 public API intentionally exposes a single, session-oriented surface
so that apps (Angular, Vue, React, Svelte, vanilla JS/TS) can drive their
UI entirely from state$ + isConnected$ + receive$ + terminalText$ + lines$ + errors$ without rebuilding any
state, read loops, or write queues themselves.
if (!session.isBrowserSupported()) { console.error('Web Serial API is not supported in this browser'); } else { session.state$.subscribe((state) =>console.log('state:', state)); session.receive$.subscribe((chunk) =>console.log('rx:', chunk)); session.errors$.subscribe((error) =>console.error('err:', error));
web-serial-rxjs
A TypeScript library that wraps the Web Serial API with a minimal, RxJS-based session surface.
Public API (v2)
The v2 public API intentionally exposes a single, session-oriented surface so that apps (Angular, Vue, React, Svelte, vanilla JS/TS) can drive their UI entirely from
state$+isConnected$+receive$+terminalText$+lines$+errors$without rebuilding any state, read loops, or write queues themselves.state$payload values (const + type)Browser Support
The Web Serial API is only available in Chromium-based browsers:
Use SerialSession.isBrowserSupported for a synchronous feature check before calling SerialSession.connect$.
Example