Artifactspublic-v0

curl

master
ply4 git calls26 ms288 KiB3 cachedprotocol v2
85 lines3.0 KiBRaw

Rustls

Rustls is a TLS backend written in Rust. curl can be built to use it as an alternative to OpenSSL or other TLS backends. We use the rustls-ffi C bindings. This version of curl is compatible with rustls-ffi 0.15.x.

Getting rustls-ffi

To build curl with rustls support you need to have rustls-ffi available first. There are three options for this:

  1. Install it from your package manager, if available.
  2. Download pre-built binaries.
  3. Build it from source.

Installing rustls-ffi from a package manager

See the rustls-ffi README for packaging status. Availability and details for installation differ between distributions.

Once installed, build curl using --with-rustls.

% git clone --depth 1 https://github.com/curl/curl
% cd curl
% autoreconf -fi
% ./configure --with-rustls
% make

Downloading pre-built rustls-ffi binaries

Pre-built binaries are available on the releases page on GitHub for releases since 0.15.0. Download the appropriate archive for your platform and extract it to a directory of your choice (e.g. ${HOME}/rustls-ffi-built).

Once downloaded, build curl using --with-rustls and the path to the extracted binaries.

% git clone --depth 1 https://github.com/curl/curl
% cd curl
% autoreconf -fi
% ./configure --with-rustls=${HOME}/rustls-ffi-built
% make

Building rustls-ffi from source

Building rustls-ffi from source requires both a rust compiler, and the cargo-c cargo plugin.

To install a Rust compiler, use rustup or your package manager to install the 1.73 or newer toolchain.

To install cargo-c, use your package manager, download a pre-built archive, or build it from source with cargo install cargo-c.

Next, check out, build, and install the appropriate version of rustls-ffi using cargo:

% git clone --depth 1 --branch v0.15.3 https://github.com/rustls/rustls-ffi
% cd rustls-ffi
% cargo capi install --release --prefix=${HOME}/rustls-ffi-built

Now configure and build curl using --with-rustls:

% git clone --depth 1 https://github.com/curl/curl
% cd curl
% autoreconf -fi
% ./configure --with-rustls=${HOME}/rustls-ffi-built
% make

See the rustls-ffi README for more information on cryptography providers and their build/platform requirements.

1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
4SPDX-License-Identifier: curl
5-->
7# Rustls
9[Rustls is a TLS backend written in Rust](https://docs.rs/rustls/). curl can
10be built to use it as an alternative to OpenSSL or other TLS backends. We use
11the [rustls-ffi C bindings](https://github.com/rustls/rustls-ffi). This
12version of curl is compatible with `rustls-ffi` 0.15.x.
14## Getting rustls-ffi
16To build `curl` with `rustls` support you need to have `rustls-ffi` available first.
17There are three options for this:
191. Install it from your package manager, if available.
202. Download pre-built binaries.
213. Build it from source.
23### Installing rustls-ffi from a package manager
25See the [rustls-ffi README] for packaging status. Availability and details for installation
26differ between distributions.
28Once installed, build `curl` using `--with-rustls`.
30 % git clone --depth 1 https://github.com/curl/curl
31 % cd curl
32 % autoreconf -fi
33 % ./configure --with-rustls
34 % make
36[rustls-ffi README]: https://github.com/rustls/rustls-ffi?tab=readme-ov-file
38### Downloading pre-built rustls-ffi binaries
40Pre-built binaries are available on the [releases page] on GitHub for releases since 0.15.0.
41Download the appropriate archive for your platform and extract it to a directory of your choice
42(e.g. `${HOME}/rustls-ffi-built`).
44Once downloaded, build `curl` using `--with-rustls` and the path to the extracted binaries.
46 % git clone --depth 1 https://github.com/curl/curl
47 % cd curl
48 % autoreconf -fi
49 % ./configure --with-rustls=${HOME}/rustls-ffi-built
50 % make
52[releases page]: https://github.com/rustls/rustls-ffi/releases
54### Building rustls-ffi from source
56Building `rustls-ffi` from source requires both a rust compiler, and the [cargo-c] cargo plugin.
58To install a Rust compiler, use [rustup] or your package manager to install
59the **1.73** or newer toolchain.
61To install `cargo-c`, use your [package manager][cargo-c pkg], download
62[a pre-built archive][cargo-c prebuilt], or build it from source with `cargo install cargo-c`.
64Next, check out, build, and install the appropriate version of `rustls-ffi` using `cargo`:
66 % git clone --depth 1 --branch v0.15.3 https://github.com/rustls/rustls-ffi
67 % cd rustls-ffi
68 % cargo capi install --release --prefix=${HOME}/rustls-ffi-built
70Now configure and build `curl` using `--with-rustls`:
72 % git clone --depth 1 https://github.com/curl/curl
73 % cd curl
74 % autoreconf -fi
75 % ./configure --with-rustls=${HOME}/rustls-ffi-built
76 % make
78See the [rustls-ffi README][cryptography provider] for more information on cryptography providers and
79their build/platform requirements.
81[cargo-c]: https://github.com/lu-zero/cargo-c
82[rustup]: https://rustup.rs/
83[cargo-c pkg]: https://github.com/lu-zero/cargo-c?tab=readme-ov-file#availability
84[cargo-c prebuilt]: https://github.com/lu-zero/cargo-c/releases
85[cryptography provider]: https://github.com/cpu/rustls-ffi?tab=readme-ov-file#cryptography-provider
Diagnostics4 git calls · 26 ms
CallStatusSizeTime026 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=22
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2001.2 KiB · hit22 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=1203
git.response.cache=HIT
git.response.duration_ms=22
git.fetch.wants=4899a10aacefd520964ca0e5b284022d2fa4e942
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1203
git.pkt.payload.max=1182
git.sideband.band1.bytes=1181
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e1fa04b91024ce
Request
af7061b9…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format