#uri #builder #http #parser

no-std yuri

no_std alloc-free URI Parser

4 releases

0.1.0 Nov 2, 2024
0.1.0-absolut2 Nov 1, 2024
0.1.0-absolut1 Oct 31, 2024
0.1.0-absolut0 Oct 13, 2024

#123 in Science

Download history 1/week @ 2024-07-22 9/week @ 2024-09-23 4/week @ 2024-09-30 111/week @ 2024-10-07 58/week @ 2024-10-14 342/week @ 2024-10-28 18/week @ 2024-11-04

529 downloads per month

Apache-2.0/MIT

35KB
791 lines

yuri

meme why uri when you can have yuri

no_std, alloc-free permissive URI Parser & Builder

let s = "https://foo:secret@foobar.test:666/?q=a&m=s#fragemnt";
let uri = yuri::Uri::new(s).expect("Failed to parse URI");

Motivation

Optimise on size and being permissive and flexible minimally parsing in no_std & alloc-free environments.

Various RFCs / standards & intepretations complicate the picture,

e.g. punycode and this is left to the downstream consumer currently to validate.

We may in the future support opt-in further validation (e.g. IDNA), which the downstream consumer must consider.

Benchmark

In MacBook M1 13":

Scenario Criterion
yuri::Uri New full HTTPs URL [65.657 ns 65.751 ns 65.846 ns]

RFCs

RFC Status Description
rfc3986 must 2005 / Uniform Resource Identifier (URI): Generic Syntax
rfc6570 maybe 2012 / URI Template / variable expansion
rfc8820 ? 2020 / URI Design and Ownership
rfc8615 ? 2019 / Well-Known Uniform Resource Identifiers (HTTP)

Dependencies

~0–670KB