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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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]

Properties

Versions 0.1.0, 0.1.1, 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.2), tls-session-manager (>=0.0.5 && <0.1) [details]
License BSD-3-Clause
Copyright Laurent P. René de Cotret
Author Laurent P. René de Cotret
Maintainer The Distributed Haskell team
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)
Uploaded by LaurentRDC at 2026-01-01T17:28:15Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


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:

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.