Skip to content

JavaScript/TypeScript Browser Runtime Notes

Browser and edge clients use @nnrp/browser-client. The browser client package carries browser WASM primitives and exposes the same client session workflow described in the Client API.

Browser Transport

Use @nnrp/transport-websocket for the default browser-native carrier. TCP, QUIC, and IPC provider packages are native-host packages.

@nnrp/browser-client owns the nnrp-wasm-browser artifact. The browser branch of @nnrp/transport-websocket uses those runtime primitives with the host WebSocket object. Native WebSocket artifacts remain inside @nnrp/transport-websocket.

WASM Artifact Helpers

APIDescription
createWasmRuntimeBinding(options?)Creates a browser manifest, module URL, optional module, optional artifact, and browser transport providers.
resolveWasmArtifact(options)Validates an artifact manifest and resolves WASM/types URLs.
validateWasmArtifactManifest(manifest, requiredExports?)Validates the WASM primitive manifest and required exports.

Runtime Boundary

PackageIncludes native .dll / .so / .dylibIncludes browser WASM primitives
@nnrp/browser-clientNoYes
@nnrp/transport-websocketYes on Node.js/DenoNo; uses @nnrp/browser-client
@nnrp/transport-tcpYesNo
@nnrp/transport-quicYesNo
@nnrp/transport-ipcYesNo

NNRP Documentation