Skip to content

v2.0.0

Compare
Choose a tag to compare
@anonrig anonrig released this 04 Sep 17:11
· 40 commits to main since this release
e24c387

We are very excited to release v2.0.0. This is the second major release of Ada for Rust.

Breaking Changes

  • We updated the function signatures to use Option<&str> instead of &str for removing certain attributes from the URL.
let mut url = Url::parse("https://ada-url.com").expect("URL should be valid");
url.set_pathname(Some("/playground"));
  • We changed the error signature to avoid unnecessary allocation.

New Features

URLComponents struct

We exposed the URL components under components() function. If you want to avoid allocating strings, you should definitely use this to construct the rest using the href attribute.

let url = Url::parse("https://ada-url.com").expect("URL should be valid");
let components = url.components()
// You can now call components.host_start

New no-std feature

If you want to avoid using the standard library of Rust, you can now use Ada without std.

ada_url = { version = "2", default-features = false }

Changelog

New Contributors

Full Changelog: v1.4.3...v2.0.0