paritytech / paritytech/host-rust-core
Bound memory use in the CLI browser bridge
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 10
- Forks
- 3
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 148
Description
The CLI browser bridge converts binary frames and WebSocket payloads into JSON number arrays across Playwright bindings. A 64 MiB binary payload can therefore occupy much more memory across the browser, JSON serialization and Bun copies. The WebSocket event queue also lacks a byte budget.
Raised in https://github.com/paritytech/host-rust-core/pull/829#issuecomment-5728861174. Permission enforcement fixes stay in #829; transport resource budgeting needs a consistent policy across these paths.
- Define byte limits for product protocol frames, WebSocket messages and queued events, accounting for simultaneous connections.
- Reduce binary serialization amplification and reject oversized payloads before avoidable copies where possible.
- Apply backpressure or close a stalled connection when its budget is exhausted.
- Add focused boundary and slow-consumer checks, and document supported limits.
Codex-assisted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI browser bridge and trace binary frame and WebSocket payload handling across the Playwright bindings and Bun copies. Define limits for protocol frames, messages, and queued events, then add boundary and slow-consumer checks; done includes rejecting or applying backpressure to over-budget work and documenting supported limits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, playwright, swift
- Domain
- cli, networking, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100