@replit/river-codegen

0.0.19 • Public • Published

@replit/river-codegen

River (the name we're giving the protocol by which the Workspace and pid2 communicate) is heavily inspired by and is a superset of gRPC. River also supports something called "stream with initialization message" to avoid a case of a client-side stream being forced to be a union of an initialization message and a stream message (make invalid states unrepresentable and all that).

This codebase is a way to have some interoperability between gRPC and River's wire format. That way services can be declared using mostly stock gRPC and implemented in another language / binary (e.g. Python) and then their River declarations exported as an npm package and consumed as a client in another codebase. This means that a service can have a single gRPC declaration and implementation with one adapter that can allow it to have a WebSockets River server.

Usage

pnpm add @replit/river-codegen
pnpm exec river-codegen --include-path proto proto/service.proto

This will codegen the service.proto types that can be npm-packed and imported from repl-it-web.

Readme

Keywords

none

Package Sidebar

Install

npm i @replit/river-codegen

Weekly Downloads

25,111

Version

0.0.19

License

none

Unpacked Size

32.9 kB

Total Files

8

Last publish

Collaborators

  • krishatreplit
  • mikewesthad
  • motzyball
  • juan.replit
  • ahulbert-replit
  • james-addison-replit
  • replitdstewart
  • ryanweingast
  • harryatreplit
  • theflowingsky
  • jonesit-replit
  • szymon_k
  • cdmistman
  • jackyzha0
  • jamesaustinreplit
  • lopezhoracio
  • bradymaddenreplit
  • ryantm
  • alexisreplit
  • ink404
  • brianpool
  • tobyho
  • brenoafb
  • masad-frost
  • lincolnreplit
  • stkenned
  • replitmatt
  • cbrewster
  • ltazmin_replit
  • moudy
  • schestakov
  • lhchavez
  • slmjkdbtl
  • lunaroyster