url

A WHATWG-standard-compliant URL parser and manipulation library for Rust.

Library
Cargo
v2.5.8
1,575 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
63 /100 Good
Development Activity 36
Maintenance 36
Community 80
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 88
Code Quality 92
Innovation 80
Learning Curve 65

The url crate is Rust’s canonical URL parsing, validation, and manipulation library, implementing the WHATWG URL Living Standard so behavior matches web browsers exactly. Originally developed for the Servo browser engine, it now underpins a huge share of the Rust ecosystem — from HTTP clients like reqwest to web crawlers and CLI tools — with over 743 million downloads.

It ships as a small Cargo workspace of focused crates (url, idna, percent-encoding, form_urlencoded) so each concern — punycode/IDNA conversion, percent-encoding, and form-urlencoded parsing — can be reused independently. The core Url type supports zero-copy component slicing, relative URL resolution, and optional no_std, serde, and browser-quirks APIs.

What You Get

  • A Url type with typed accessors and mutators for scheme, host, port, path, query, and fragment
  • A WHATWG-spec-compliant parser tested against the official web-platform-tests URL conformance suite
  • Automatic percent-encoding/decoding and IDNA/punycode handling for internationalized hosts
  • A no_std-compatible core plus optional serde, expose_internals, and browser-quirks APIs

Common Use Cases

  • Parsing and validating URLs from user input or config files
  • Resolving relative links against a base URL (crawlers, browsers, package managers)
  • Building and normalizing request URLs for HTTP clients
  • Comparing or deduplicating URLs by their normalized, parsed form

Under The Hood

Architecture rust-url is organized as a Cargo workspace that splits concerns into focused, independently-versioned crates: percent-encoding and form_urlencoded handle low-level encoding, idna handles Unicode domain-name conversion (via the ICU4X-backed idna_adapter), and url composes them into the public Url type. Internally, Url stores the serialized string plus a set of byte offsets (see slicing.rs’s Position enum), so components are extracted by indexing into the string rather than allocating substrings. parser.rs (~69KB) implements the WHATWG URL state machine directly against the spec, host.rs models Host as Domain/Ipv4/Ipv6 variants, and quirks.rs layers a second API surface that mirrors the exact JavaScript URL getter/setter semantics used by browser engines. This is a deliberately layered, spec-driven design: change the state machine and everything downstream (Servo, reqwest, thousands of dependents) inherits the fix.

Tech Stack The crate is #![no_std] with an alloc feature for constrained environments, and a std feature (default) layered on top; serde/serde_derive are optional dependencies gated behind a serde feature flag, and wasm-bindgen-test covers the wasm32 target in dev-dependencies. Sibling workspace crates are pulled in via path dependencies with independent semver (idna 1.1.0, percent-encoding 2.3.2, form_urlencoded 1.2.2), and MSRV is pinned at Rust 1.63. CI (.github/workflows/main.yml) runs cargo test across multiple feature combinations (default, no-default-features --features=alloc, serde+expose_internals), plus cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings.

Code Quality Test coverage is unusually rigorous for a crate of its size: tests/wpt.rs runs a custom harness against tests/urltestdata.json, the official WHATWG web-platform-tests URL conformance suite, plus a dedicated setters_tests.json for component-mutation behavior. Nearly every public method in lib.rs (over 100KB, largely doc comments) carries a runnable doctest asserting real parsing behavior, in addition to unit #[test] functions across the workspace. CI enforces formatting and clippy -D warnings on every push, and the crate has been actively maintained since 2013 with 1,415+ commits.

API Design The public API centers on a single ergonomic entry point, Url::parse, returning a typed Result<Url, ParseError> rather than panicking or returning opaque errors. Components are exposed as zero-copy string slices addressable via the Position enum (&url[Position::BeforePath..]), percent-encoding and IDNA/punycode are handled transparently so callers rarely touch them directly, and the separate quirks module offers a parallel API replicating the JS URL object’s exact behavior for interop scenarios (e.g. Servo’s DOM bindings). The tradeoff is a large, dense lib.rs, but the payoff is an API that composes cleanly with reqwest, serde, and other crates that accept impl Into<Url>-style patterns.

Used by 77 apps in this directory

TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 4 days ago
Dart
74%
AGPL 3.0

AppFlowy

AI Assistants · Collaboration · Productivity

76,967

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
67
Dependency
Built with
Dart 74%
Rust 24%
Updated 1 weeks ago
Rust
86%
Other

Arroyo

Analytics · Data Engineering

5,039

A distributed stream processing engine written in Rust that lets you write SQL to run stateful, real-time computations over data streams with subsecond results.

View details
86
Repo Health
74
Technical
62
Dependency
Built with
Rust 86%
Updated 1 weeks ago
Rust
54%
Other

Cap

Team Chat · Video Conferencing

22,884

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust 54%
TypeScript 42%
Updated 4 days ago
Rust
54%
Other

Cap

Team Chat · Video Conferencing

22,884

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust 54%
TypeScript 42%
Updated 4 days ago
Rust
54%
Other

Cap

Team Chat · Video Conferencing

22,884

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust 54%
TypeScript 42%
Updated 4 days ago
Rust
67%
Other

DefGuard

Authentication · Networking · Security

2,849

Self-hosted secure remote access that unifies WireGuard VPN, identity management, and connection-level MFA in one open-source platform.

View details
84
Repo Health
82
Technical
72
Dependency
Built with
Rust 67%
TypeScript 31%
Updated 1 weeks ago
Java
34%
Apache 2.0

Enso

Analytics · Data Engineering · Low Code Platforms

7,441

A visual and textual programming platform for data prep and analysis where the node graph and the underlying Enso code are always perfectly in sync, built by an Alteryx co-founder on a GraalVM engine.

View details
59
Repo Health
90
Technical
61
Dependency
Built with
Java 34%
TypeScript 27%
Scala 26%
Updated 1 months ago
Rust
80%
MIT

fabro

Developer Tools · Devops

1,658

Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.

View details
82
Repo Health
83
Technical
67
Dependency
Built with
Rust 80%
TypeScript 15%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers