Web Search (Rust)
Rust implementation of the web-search library, CLI, and HTTP service. It
mirrors the JavaScript package in ../js with the same 22-provider catalog,
provider categories, merge strategies, and discovery surface.
Install
As a library:
[]
= "0.2"
From a local checkout before a crates.io release is visible:
[]
= { = "../web-search/rust" }
Library
use ;
async
CLI
HTTP Service
Providers
The live registry has 22 providers in four categories:
| Category | Provider ids |
|---|---|
search |
google, bing, duckduckgo, searx, brave, mojeek, ecosia, startpage, yahoo, lite, wc:* |
knowledge |
wikipedia, wikidata |
papers |
crossref, openalex, arxiv |
code |
github, hackernews |
google and bing use official APIs when credentials are configured and fall
back to HTML parsing otherwise. GITHUB_TOKEN is optional and raises the GitHub
search rate limit.
web-capture
wc:wikipedia, wc:duckduckgo, wc:google, wc:bing, and wc:brave delegate
to the published web-capture crate. Runtime errors from that component are
logged and converted to an empty result set so other selected providers can
still return results.
use ;
let provider = new;
let results = provider.search.await?;
Release
The Rust workflow publishes web-search to crates.io from main after lint,
tests, doc tests, and package checks pass. GitHub releases are tagged as
rust-v<version> so they stay distinct from JavaScript js-v<version> releases.
The current web-capture 0.3.30 dependency requires two transitive pins:
html-to-markdown-rs = 3.5.7 and time = 0.3.36. They match the dependency
graph the component was released against and avoid known compile breaks in newer
compatible-range releases.
Development
Cross-language parity is checked from the repository root:
License
Unlicense - Public Domain