• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Hyper
2
3Hyper is a separate HTTP library written in Rust. curl can be told to use this
4library as a backend to deal with HTTP.
5
6## Experimental!
7
8Hyper support in curl is considered **EXPERIMENTAL** until further notice. It
9needs to be explicitly enabled at build-time.
10
11Further development and tweaking of the Hyper backend support in curl will
12happen in in the master branch using pull-requests, just like ordinary
13changes.
14
15## Hyper version
16
17The C API for Hyper is brand new and is still under development.
18
19## build curl with hyper
20
21Build hyper and enable the C API:
22
23     % git clone https://github.com/hyperium/hyper
24     % cd hyper
25     % RUSTFLAGS="--cfg hyper_unstable_ffi" cargo build --features client,http1,http2,ffi
26
27Build curl to use hyper's C API:
28
29     % git clone https://github.com/curl/curl
30     % cd curl
31     % ./buildconf
32     % ./configure --with-hyper=<hyper dir>
33     % make
34
35# using Hyper internally
36
37Hyper is a low level HTTP transport library. curl itself provides all HTTP
38headers and Hyper provides all received headers back to curl.
39
40Therefore, most of the "header logic" in curl as in responding to and acting
41on specific input and output headers are done the same way in curl code.
42
43The API in Hyper delivers received HTTP headers as (cleaned up) name=value
44pairs, making it impossible for curl to know the exact byte representation
45over the wire with Hyper.
46
47## Limitations
48
49The hyper backend doesn't support
50
51- `CURLOPT_IGNORE_CONTENT_LENGTH`
52- RTSP
53
54## Remaining issues
55
56This backend is still not feature complete with the native backend. Areas that
57still need attention and verification include:
58
59- multiplexed HTTP/2
60- h2 Upgrade:
61- pausing transfers
62- co-exist with a HTTP/3 build
63- receiving HTTP/1 trailers
64- sending HTTP/1 trailers
65- accept-encoding
66- transfer encoding
67- alt-svc
68- hsts
69- DoH ([#6389](https://github.com/curl/curl/issues/6389))
70