grpc_dc (Dart / Flutter)
gRPC over WebRTC DataChannels — a dependency-free generated
Dart runtime: client and server, all four call shapes
(unary, server/client streaming, bidi), deadlines, metadata,
and status over a single DataChannel. No grpc or WebRTC
package underneath; stub code is generated from your .proto
by the grpc-dc protoc plugins.
Install: dart pub add grpc_dc (or flutter pub add grpc_dc).
import 'package:grpc_dc/grpc_dc.dart';
See example/example.dart for a complete in-memory
client/server call. Transports: the main library is
platform-neutral (Flutter native + web, Dart VM). The
dart:io transports (HTTP/2, sidecar, git event bus) live
at package:grpc_dc/grpcdc/http2_transport.dart and
friends, imported directly on the VM; on the web (Flutter
web included) import
package:grpc_dc/grpcdc/web_transport.dart and hand
WebTransport your page's RTCDataChannel bridge
({send(Uint8Array), setOnMessage(cb)}). Kafka stubs
ship separately
in the kafka_grpc package, which depends on this one.
Libraries
- grpc_dc
- grpcdc/channel
- grpcdc/codec
- grpcdc/dynamic
- grpcdc/endpoint
- grpcdc/eventbus
- Event bus (grpcdc.events.v1.EventBus): in-memory broker, client helpers, and tag matching. Wire messages and stubs are generated from proto/events.proto (events_messages, events_grpc_dc); the broker policy comes from the shared event-bus spec.
- grpcdc/eventbus_git
- Git log serde for the event bus: exports an event log to a git branch (one commit per event) and imports it back. The live broker never touches git; this is the durable serde layer beside it. dart:io Process drives the git plumbing.
- grpcdc/events_grpc_dc
- grpcdc/events_messages
- grpcdc/http2_transport
- grpcdc/memory_transport
- grpcdc/server
- grpcdc/sidecar_transport
- grpcdc/status
- grpcdc/transport
- grpcdc/web_transport
- grpcdc/wire