npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mrpc-web

v0.0.5

Published

An RPC wrapper around profobufs that uses websockets and http requests (web)

Readme

mrpc-web

A basic RPC wrapper around protobuf and websockets to facilitate writing web services and apps.

Features include:

  • Uses proto3 to define services/messages
  • Uses websockets for transport
  • Friendly interfaces to define services/clients

This library is meant to be used in web pages running in a browser, to use this in a nodejs runtime see mprc-node.

Usage

Code Generation

mRPC's typescript integration is built around ts-proto generated interfaces and types.

First, add that to your project:

yarn add --dev ts-proto

and install the protobuf compiler so you have the protoc command. Then, you can use these to generate typescript bindings for use with mRPC:

protoc \
  --plugin=protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto \
  --ts_proto_out=./src/gen \
  --ts_proto_opt=env=browser,outputServices=generic-definitions,outputServices=default \
  --proto_path=../proto \
  ../proto/*.proto

Put that in a bash script for convenience to quickly update the typescript whenever you change the .proto files.

Writing Clients

Once you have the generated ts-proto types, you can simply import them, import the mrpc-web library, create an RpcClientChannel around a hostname or a Socket object, and pass that into a ___ClientImpl's constructor:

import { RpcClientChannel } from "netrpc-web";
// Generated from an example helloworld.proto
import {
  GreeterClientImpl,
  Greeter,
} from "./gen/helloworld"

const channel = new RpcClientChannel({host: 'http://localhost:8080'});
const client = new GreeterClientImpl(channel);
...
const result = await client.SayHello({name: "Alice"});

You can also write services in the Browser - simply wrap a socket that was previously connected and the Server can now act as a client to the webpage.

See https://github.com/maunvz/mRPC/tree/main/samples for a full example of a server/client nodejs command line.