xref: /curl/docs/RUSTLS.md (revision 89728451)
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7# Rustls
8
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 depends on version v0.14.0 of rustls-ffi.
13
14# Building with Rustls
15
16First, [install Rust](https://rustup.rs/).
17
18Next, check out, build, and install the appropriate version of rustls-ffi:
19
20    % git clone https://github.com/rustls/rustls-ffi -b v0.14.0
21    % cd rustls-ffi
22    % make
23    % make DESTDIR=${HOME}/rustls-ffi-built/ install
24
25Now configure and build curl with Rustls:
26
27    % git clone https://github.com/curl/curl
28    % cd curl
29    % autoreconf -fi
30    % ./configure --with-rustls=${HOME}/rustls-ffi-built
31    % make
32
33See the [rustls-ffi README] for more information on cryptography providers and
34their build/platform requirements.
35
36[rustls-ffi README]: https://github.com/rustls/rustls-ffi/blob/main/README.md#cryptography-provide
37