Skip to content

Compile-time url parsing 'url!' macro #136

@frewsxcv

Description

@frewsxcv

Inspired by sfackler/rust-postgres-macros which is a compile time SQL parser

There are ton of instances in servo, where we do something like Url::parse("http://mozilla.com").unwrap(). It'd be great if we could do that validation at compile time with a macro (e.g. url!("http://mozilla.com")).

I have no idea how feasible this is, just throwing around the idea.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions