ada
Safe Nim wrapper over ada-url, a SIMD accelerated URL parser
Wraps a native library — check OS Compatibility below for platform-specific linking notes.
Summary
| Latest Version | 1.0.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-09-04 07:26 |
Tags
Authors
- Trayambak Rai
Installation
nimble install ada
choosenim install ada
git clone https://github.com/ferus-web/nim-ada
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| ada | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 2.0.0 | No |
Source
| Repository | https://github.com/ferus-web/nim-ada |
|---|---|
| Homepage | https://github.com/ferus-web/nim-ada |
| Registry Source | nimble_official |
README
WARNING: This package is deprecated, and is known to be incompatible with recent versions. Do not use it! Use url instead for a WHATWG URL parser written entirely in Nim.
nim-ada
This library provides low-level bindings and a high-level wrapper over ada-url, a high-performance and WHATWG-compliant URL parser written in C++. \ The high-level wrapper manages memory for you via ORC move semantics.
Documentation for this library can be found here.
This library has been tested and confirmed to work with ada-url 3.2.1
installation
To add this library to your project, run the following command:
$ nimble add ada
If you simply wish to install it, run this command:
$ nimble install ada
examples
parsing a URL
import std/options
import pkg/ada
var url = parseURL("https://example.com/path?x=y")
echo url.hostname ## example.com
echo url.pathname ## /path?x=y
echo url.query.get() ## ?x=y
validating a URL
import pkg/ada
let
urls = [
"https://github.com",
"https://lk.m.e,3.,ao????2.s.", # <--- These are technically valid URLs,
"mxl:://///dmnems.xyie", # <--- as the WhatWG URL spec is very forgiving for erroneous inputs.
"https://google.com",
"....", # <--- However, these two are not.
";:@;3!..//1@#;21" # <---
]
for url in urls:
echo '[' & url & "]: " & (
if isValidURL(url):
"valid"
else:
"invalid"
)