network-transport-quic: Networking layer for Cloud Haskell based on QUIC

[ bsd3, library, network ] [ Propose Tags ] [ Report a vulnerability ]

Networking layer for Cloud Haskell based on QUIC.

The QUIC protocol has several advantages over TCP, including built-in encryption via TLS 1.3, support for connection migration (e.g. when transitioning from WIFI to 5G), and stream multiplexing which eliminates head-of-line blocking.

In dense network topologies, using [Network.Transport.QUIC] may improve performance by a factor of 2 over other transport implementations.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.1.1
Change log CHANGELOG.md
Dependencies async (>=2.2 && <2.3), base (>=4.14 && <5), binary (>=0.8 && <0.10), bytestring (>=0.11 && <0.13), containers (>=0.6 && <0.9), microlens-platform (>=0.4 && <0.5), network (>=3.1 && <3.3), network-transport (>=0.5 && <0.6), quic (>=0.2.20 && <0.3), stm (>=2.4 && <2.6), tls (>=2.1 && <2.3), tls-session-manager (>=0.0.5 && <0.1) [details]
Tested with ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.8, ghc ==9.4.8, ghc ==9.6.7, ghc ==9.8.4, ghc ==9.10.3, ghc ==9.12.2
License BSD-3-Clause
Copyright Laurent P. René de Cotret
Author Laurent P. René de Cotret
Maintainer The Distributed Haskell team
Uploaded by LaurentRDC at 2026-01-01T17:31:03Z
Revised Revision 1 made by LaurentRDC at 2026-01-13T15:55:21Z
Category Network
Home page https://haskell-distributed.github.io
Bug tracker https://github.com/haskell-distributed/distributed-process/issues
Source repo head: git clone https://github.com/haskell-distributed/distributed-process(packages/network-transport-quic)
Distributions
Downloads 8 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-01-01 [all 1 reports]

Readme for network-transport-quic-0.1.1

[back to package description]

network-transport-quic

This package provides an implementation of the network-transport interface, where networking is done via the QUIC protocol. The primary use-case for this package is as a Cloud Haskell backend.

QUIC has many advantages over TCP, including:

  • No head-of-line blocking. Independent streams mean packet loss on one stream doesn't stall others;
  • Connection migration. Connections survive IP address changes, which is important when a device switches from e.g. WIFI to 5G;
  • Built-in encryption via TLS 1.3;

In benchmarks, network-transport-quic performs better than network-transport-tcp in dense network topologies. For example, if every EndPoint in your network connects to every other EndPoint, you might benefit greatly from switching to network-transport-quic!

Usage example

Provided you have a TLS 1.3 certificate, you can create a Transport like so:

import Data.List.NonEmpty qualified as NonEmpty
import Network.Transport.QUIC (QUICTransportConfig(..), createTransport, credentialLoadX509)

main = do
    let certificate = "path/to/cert.crt"
        key = "path/to/cert.key"

    creds <- credentialLoadX509 certificate key
    case creds of
        Left error_message -> error error_message
        Right credential -> do
            let config = QUICTransportConfig
                            { hostName = "my.hostname.com" -- or some IP address
                            , serviceName = "https" -- alternatively, some port number
                            , credentials = NonEmpty.singleton credential
                            , validateCredentials = True -- should be 'False' for self-signed certificate
                            }
            transport <- createTransport config
            ...

There are tools online to help create self-signed TLS 1.3 certificates.