effect icon indicating copy to clipboard operation
effect copied to clipboard

Add @effect/rpc-fastify package

Open mikearnaldi opened this issue 1 month ago • 1 comments

Summary

  • Adds @effect/rpc-fastify package for integrating @effect/rpc with Fastify servers
  • Provides both Effect-based and synchronous APIs for flexibility

APIs

  • register - Register RPC handler as a Fastify plugin with automatic content-type parser configuration (recommended)
  • registerEffect - Same as register but returns an Effect for integration with existing Effect applications
  • toFastifyHandler - Create a handler with a layer, returns { handler, dispose }
  • toFastifyHandlerEffect - Create a handler as an Effect, context provided externally

Features

  • Full support for streaming RPCs (RpcSchema.Stream)
  • Proper backpressure handling for streams
  • Client disconnect detection and fiber interruption
  • Defect handling with proper error propagation
  • MemoMap support for layer sharing
  • Middleware support for HTTP app transformation

mikearnaldi avatar Dec 01 '25 12:12 mikearnaldi

⚠️ No Changeset found

Latest commit: dba3970cd0f3ddd1e0c5ef58d52f7b4d895950fe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Dec 01 '25 12:12 changeset-bot[bot]