#url #no-std

no-std nourl

A simple Url primitive for no_std environments

2 releases

0.1.1 Jan 30, 2023
0.1.0 Jan 30, 2023

#224 in #url

Download history 67/week @ 2023-11-18 27/week @ 2023-11-25 33/week @ 2023-12-02 22/week @ 2023-12-09 15/week @ 2023-12-16 2/week @ 2023-12-23 2/week @ 2023-12-30 51/week @ 2024-01-06 94/week @ 2024-01-13 19/week @ 2024-01-20 18/week @ 2024-01-27 26/week @ 2024-02-03 58/week @ 2024-02-10 96/week @ 2024-02-17 66/week @ 2024-02-24 148/week @ 2024-03-02

372 downloads per month
Used in reqwless

MIT/Apache

10KB
220 lines

A simple Url primitive

CI crates.io

This crate provides a simple Url type that can be used in embedded no_std environments.

If you are missing a feature or would like to add a new scheme, please raise an issue or a PR.

The crate runs on stable rust.

Example

let url = Url::parse("http://localhost/foo/bar").unwrap();
assert_eq!(url.scheme(), UrlScheme::HTTP);
assert_eq!(url.host(), "localhost");
assert_eq!(url.port_or_default(), 80);
assert_eq!(url.path(), "/foo/bar");

The implementation is heavily inspired (close to copy/pase) from the Url type in reqwless.

Dependencies

~165KB