Skip to content

Phase 4: extract socket-transport.js shim for runtime-swap prep #26

@gmaclennan

Description

@gmaclennan

Future-proof the runtime by isolating the two `node:net` usages in the backend behind a single `backend/lib/socket-transport.js` shim. Lets us swap the implementation later (Bare's `bare-pipe`, JSI module, etc.) without touching everything else.

Source plan: `docs/build-architecture-plan.md` §2 / Phase 4.

Current callsites:

  • `backend/lib/server-helper.js:1` — `net.createServer`
  • the connection side (any client `net.connect`/`net.Socket` direct usage)

No user-visible change; pure refactor. Optional and orthogonal — keep the door open for a later runtime swap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions