Feature request
Add RIS Live support to the @bgpkit/parser WebAssembly package so JavaScript and TypeScript users can parse RIPE RIS Live WebSocket messages in browser, Worker, and Node.js environments.
Current state
The WASM package exposes parsers for BGP UPDATE, BMP/OpenBMP, and MRT records, but it does not currently expose RIS Live helpers:
- no
parseRisLiveMessageJson(...) export
- no
parseRisLiveMessageRaw(...) export
- no WebSocket convenience helper for RIS Live subscriptions
- the WASM feature path does not currently include the RIS Live/raw-message dependencies needed for parsing
socketOptions.includeRaw messages
Proposed API
Start with lower-level parser exports:
parseRisLiveMessageJson(message: string): BgpElem[]
parseRisLiveMessageRaw(message: string): BgpElem[]
Then optionally add a convenience WebSocket helper:
const stream = connectRisLive({
host: 'rrc00',
includeRaw: true,
});
for await (const elems of stream) {
for (const elem of elems) {
console.log(elem.prefix, elem.as_path);
}
}
Design notes
- Prefer
includeRaw: true for full BGP wire-message parsing, preserving attributes omitted by RIS Live's JSON projection.
- Keep the parser exports independent from transport so browser, Worker, and Node.js users can bring their own WebSocket implementation.
- If adding a WebSocket helper, consider whether Node.js support should use an optional dependency or require callers to provide a WebSocket constructor.
- Update WASM TypeScript definitions, README, and examples.
Acceptance criteria
@bgpkit/parser exports RIS Live JSON and raw-message parsing helpers.
- TypeScript definitions cover the new APIs.
- Documentation includes a RIS Live WebSocket example.
- Tests cover at least one JSON-projected RIS Live UPDATE and one
includeRaw RIS Live UPDATE.
Feature request
Add RIS Live support to the
@bgpkit/parserWebAssembly package so JavaScript and TypeScript users can parse RIPE RIS Live WebSocket messages in browser, Worker, and Node.js environments.Current state
The WASM package exposes parsers for BGP UPDATE, BMP/OpenBMP, and MRT records, but it does not currently expose RIS Live helpers:
parseRisLiveMessageJson(...)exportparseRisLiveMessageRaw(...)exportsocketOptions.includeRawmessagesProposed API
Start with lower-level parser exports:
Then optionally add a convenience WebSocket helper:
Design notes
includeRaw: truefor full BGP wire-message parsing, preserving attributes omitted by RIS Live's JSON projection.Acceptance criteria
@bgpkit/parserexports RIS Live JSON and raw-message parsing helpers.includeRawRIS Live UPDATE.