ada URL parser

May 05, 2023

WHATWG-compliant and fast URL parser written in modern C++

The interesting bit to me is that this repo contains a useful tool: adaparse, which is a command line program that accepts a URL and prints a json blob with the URL's components:

$ adaparse
    "opaque path":false,

I wish it split up the query parameters. It's used as a benchmark program, so I suppose it's less useful than trurl:

$ trurl --json
  "url": "",
  "scheme": "https",
  "host": "",
  "port": "443",
  "path": "/ada-url/ada",
  "query": "arg=bananas",

Or Carl Johnson's parse-url (which I had to modify to build on modern go)

$ echo '' | parse-url | jq .
  "Scheme": "https",
  "Opaque": "",
  "User": null,
  "Host": "",
  "Path": "/ada-url/ada",
  "RawPath": "",
  "OmitHost": false,
  "ForceQuery": false,
  "RawQuery": "arg=bananas",
  "Fragment": "",
  "RawFragment": ""
↑ up