{"id":19921342,"url":"https://github.com/ada-url/rust","last_synced_at":"2025-05-16T14:04:35.473Z","repository":{"id":163480004,"uuid":"636484362","full_name":"ada-url/rust","owner":"ada-url","description":"Rust bindings for Ada URL parser","archived":false,"fork":false,"pushed_at":"2025-04-26T16:02:52.000Z","size":868,"stargazers_count":93,"open_issues_count":2,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-26T16:16:39.956Z","etag":null,"topics":["fast","parser","rust","url","whatwg-url"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/ada-url","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ada-url.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-05T00:37:02.000Z","updated_at":"2025-04-26T16:02:31.000Z","dependencies_parsed_at":"2024-01-17T02:59:41.511Z","dependency_job_id":"9f8b01bc-d0d7-4dc5-b2d6-424f2899a530","html_url":"https://github.com/ada-url/rust","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ada-url%2Frust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ada-url%2Frust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ada-url%2Frust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ada-url%2Frust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ada-url","download_url":"https://codeload.github.com/ada-url/rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fast","parser","rust","url","whatwg-url"],"created_at":"2024-11-12T22:07:18.450Z","updated_at":"2025-05-16T14:04:35.454Z","avatar_url":"https://github.com/ada-url.png","language":"Rust","readme":"# WHATWG URL parser for Rust\n\nFast [WHATWG URL Specification](https://url.spec.whatwg.org) compliant URL parser for Rust.\nWell-tested and widely used by Node.js since [Node 18](https://nodejs.org/en/blog/release/v18.17.0).\n\nThe Ada library passes the full range of tests from the specification, across a wide range of platforms (e.g., Windows, Linux, macOS).\nIt fully supports the relevant [Unicode Technical Standard](https://www.unicode.org/reports/tr46/#ToUnicode).\n\n## Usage\n\nSee [here](examples/simple.rs) for a usage example.\nYou can run it locally with `cargo run --example simple`.\nFeel free to adjust it for exploring this crate further.\n\n### Features\n\n**std:** Functionalities that require `std`.\nThis feature is enabled by default, set `no-default-features` to `true` if you want `no-std`.\n\n**serde:** Allow `Url` to work with `serde`. This feature is disabled by default. Enabling this feature without `std` would provide you only `Serialize`.\nEnabling this feature and `std` would provide you both `Serialize` and `Deserialize`.\n\n**libcpp:** Build `ada-url` with `libc++`. This feature is disabled by default.\nEnabling this feature without `libc++` installed would cause compile error.\n\n### Performance\n\nAda is fast. The benchmark below shows **3.49 times** faster URL parsing compared to `url`\n\n```text\ncan_parse/ada_url       time:   [1.2109 µs 1.2121 µs 1.2133 µs]\n                        thrpt:  [635.09 MiB/s 635.75 MiB/s 636.38 MiB/s]\n\nparse/ada_url           time:   [2.0124 µs 2.0157 µs 2.0190 µs]\n                        thrpt:  [381.67 MiB/s 382.28 MiB/s 382.91 MiB/s]\n\nparse/url               time:   [7.0530 µs 7.0597 µs 7.0666 µs]\n                        thrpt:  [109.04 MiB/s 109.15 MiB/s 109.25 MiB/s]\n```\n\n### Implemented traits\n\n`Url` implements the following traits.\n\n| Trait(s)                                                                                                                                              | Description                                                                                                                                                                                                   |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **[`Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html)**                                                                                 | Provides `to_string` and allows for the value to be used in [format!](https://doc.rust-lang.org/std/fmt/fn.format.html) macros (e.g. `println!`).                                                             |\n| **[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html)**                                                                                     | Allows debugger output in format macros, (`{:?}` syntax)                                                                                                                                                      |\n| **[`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html), [`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html)**                    | Allows for comparison, `url1 == url2`, `url1.eq(url2)`                                                                                                                                                        |\n| **[`PartialOrd`](https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html), [`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html)**                | Allows for ordering `url1 \u003c url2`, done so alphabetically. This is also allows `Url` to be used as a key in a [`BTreeMap`](https://doc.rust-lang.org/std/collections/struct.BTreeMap.html)                    |\n| **[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html)**                                                                                      | Makes it so that `Url` can be hashed based on the string representation. This is important so that `Url` can be used as a key in a [`HashMap`](https://doc.rust-lang.org/std/collections/struct.HashMap.html) |\n| **[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html)**                                                                                 | Allows for use with [`str`'s `parse` method](https://doc.rust-lang.org/std/primitive.str.html#method.parse)                                                                                                   |\n| **[`TryFrom\u003cString\u003e`, `TryFrom\u003c\u0026str\u003e`](https://doc.rust-lang.org/std/convert/trait.TryFrom.html)**                                                    | Provides `try_into` methods for `String` and `\u0026str`                                                                                                                                                           |\n| **[`Borrow\u003cstr\u003e`](https://doc.rust-lang.org/std/borrow/trait.Borrow.html), [`Borrow\u003c[u8]\u003e`](https://doc.rust-lang.org/std/borrow/trait.Borrow.html)** | Used in some crates so that the `Url` can be used as a key.                                                                                                                                                   |\n| **[`Deref\u003cTarget=str\u003e`](https://doc.rust-lang.org/std/ops/trait.Deref.html)**                                                                         | Allows for `\u0026Url` to dereference as a `\u0026str`. Also provides a [number of string methods](https://doc.rust-lang.org/std/string/struct.String.html#deref-methods-str)                                           |\n| **[`AsRef\u003c[u8]\u003e`](https://doc.rust-lang.org/std/convert/trait.AsRef.html), [`AsRef\u003cstr\u003e`](https://doc.rust-lang.org/std/convert/trait.AsRef.html)**   | Used to do a cheap reference-to-reference conversion.                                                                                                                                                         |\n| **[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html)**                                                                                    | Used to declare that the type can be transferred across thread boundaries.                                                                                                                                    |\n| **[`Sync`](https://doc.rust-lang.org/stable/std/marker/trait.Sync.html)**                                                                             | Used to declare that the type is thread-safe.                                                                                                                                                                 |\n\n## Development\n\n### `justfile`\n\nThe [`justfile`](./justfile) contains commands (called \"recipes\") that can be executed by [just](https://github.com/casey/just) for convenience.\n\n**Run all lints and tests:**\n\n```sh\njust all\n```\n\n**Skipping features:**\n\n```sh\njust all --skip=libcpp,serde\n```\n\n## License\n\nThis code is made available under the Apache License 2.0 as well as the MIT license.\n\nOur tests include third-party code and data. The benchmarking code includes third-party code: it is provided for research purposes only and not part of the library.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fada-url%2Frust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fada-url%2Frust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fada-url%2Frust/lists"}