rsurl
A pure-Rust implementation of curl, built on top of purecrypto for TLS — no OpenSSL, no system libcurl, no C dependencies.
rsurl ships in three forms:
- Rust library (
rsurlcrate) — a small, ergonomic HTTP client API for Rust projects. - C library (
librsurl.so/rsurl.h) — a curl-compatible C ABI for non-Rust consumers. rsurlCLI — a drop-in-ish replacement for thecurlcommand line.
Status
Early, in active development.
| Capability | Status | Notes |
|---|---|---|
| HTTP/1.1 (all methods) | working | Content-Length, chunked, read-to-EOF body modes |
| HTTPS via purecrypto | working | TLS 1.2/1.3, system roots, full cert verification |
| HTTP/2 (RFC 9113) | working* | ALPN h2, HPACK + Huffman decoder; single request/conn, no flow control yet |
| HTTP/3 over QUIC (RFC 9114) | partial | QUIC + frame layer wired; QPACK Huffman decoder still TODO |
| FTP / FTPS (RFC 959, 4217) | working | RETR + LIST, EPSV with PASV fallback, implicit FTPS |
| FILE (RFC 8089) | working | rejects non-local hosts |
| DICT (RFC 2229) | working | DEFINE, MATCH, SHOW DATABASES |
| GOPHER / GOPHERS (RFC 1436) | working | reads to EOF, item-type 7 search deferred |
| IMAP / IMAPS (RFC 9051) | working | LOGIN + LIST / SELECT+FETCH / UID FETCH BODY[] |
| LDAP / LDAPS (RFC 4511) | working | simple bind + search → LDIF; subset of filter syntax |
| MQTT / MQTTS (v3.1.1) | working | CONNECT, SUBSCRIBE, receive one PUBLISH (QoS 0) |
| POP3 / POP3S (RFC 1939) | working | LIST or RETR, USER/PASS auth |
| RTSP (RFC 7826) | working | DESCRIBE only; SETUP/PLAY session flow deferred |
| TFTP (RFC 1350) | working | read side with timeout/retry, 256 MiB cap |
| WS / WSS (RFC 6455) | working | reads one data frame then closes |
* HTTP/2 verified live against nghttp2.org and cloudflare.com from the implementation
worktree. Available via --http2 (force) or auto-negotiated via ALPN.
System CA bundle paths searched, in order: /etc/ssl/certs/ca-certificates.crt,
/etc/pki/tls/certs/ca-bundle.crt, /etc/ssl/cert.pem, /etc/ssl/ca-bundle.pem,
/etc/ca-certificates/extracted/tls-ca-bundle.pem.
Rust usage
let resp = get?;
println!;
println!;
CLI usage
Supported curl-style flags include -L/--location, --max-redirs,
-u/--user, -k/--insecure, --cacert, --max-time,
--connect-timeout, and -O/--remote-name. Multiple URLs on one
command line are processed sequentially.
C usage
RSURL *h = ;
;
;
const uint8_t *body; size_t len;
;
;
;
Link with -lrsurl. Function names use a rsurl_ prefix so the library
can coexist with libcurl in the same process.
Build
# Binary: target/release/rsurl
# Rust rlib: target/release/librsurl.rlib
# C cdylib: target/release/librsurl.so
# C header: include/rsurl.h
License
MIT — Copyright © 2026 Karpelès Lab Inc. See LICENSE.