113498266Sopenharmony_ci# Rustls
213498266Sopenharmony_ci
313498266Sopenharmony_ci[Rustls is a TLS backend written in Rust](https://docs.rs/rustls/). Curl can
413498266Sopenharmony_cibe built to use it as an alternative to OpenSSL or other TLS backends. We use
513498266Sopenharmony_cithe [rustls-ffi C bindings](https://github.com/rustls/rustls-ffi/). This
613498266Sopenharmony_civersion of curl depends on version v0.10.0 of rustls-ffi.
713498266Sopenharmony_ci
813498266Sopenharmony_ci# Building with rustls
913498266Sopenharmony_ci
1013498266Sopenharmony_ciFirst, [install Rust](https://rustup.rs/).
1113498266Sopenharmony_ci
1213498266Sopenharmony_ciNext, check out, build, and install the appropriate version of rustls-ffi:
1313498266Sopenharmony_ci
1413498266Sopenharmony_ci    % cargo install cbindgen
1513498266Sopenharmony_ci    % git clone https://github.com/rustls/rustls-ffi -b v0.10.0
1613498266Sopenharmony_ci    % cd rustls-ffi
1713498266Sopenharmony_ci    % make
1813498266Sopenharmony_ci    % make DESTDIR=${HOME}/rustls-ffi-built/ install
1913498266Sopenharmony_ci
2013498266Sopenharmony_ciNow configure and build curl with rustls:
2113498266Sopenharmony_ci
2213498266Sopenharmony_ci    % git clone https://github.com/curl/curl
2313498266Sopenharmony_ci    % cd curl
2413498266Sopenharmony_ci    % autoreconf -fi
2513498266Sopenharmony_ci    % ./configure --with-rustls=${HOME}/rustls-ffi-built
2613498266Sopenharmony_ci    % make
27