Configuration object for the RPC runtime.
Optional
additionalLayers?: Layer<R, E, never>[](Optional) Additional layers to merge with the RPC client layer.
Optional
serialization?: SerializationLayer(Optional) Custom serialization layer to use for RPC communication of type SerializationLayer
.
Defaults to RpcSerialization.layerNdjson
.
The base URL of the RPC server.
Creates a Effect Runtime for RPC communication with a specified URL and optional serialization. This function is useful for setting up a runtime environment without sticking it together with all the other parts. It's a convenience function over createEffectRPC and getServerLayers and potentially others.
You can give it any additional layers that the runtime should have.