wigolo icon indicating copy to clipboard operation
wigolo copied to clipboard

Add a crates.io search engine adapter

Open KnockOutEZ opened this issue 4 months ago • 0 comments

Same shape as the npm-registry adapter issue: crates.io exposes a public JSON search API (https://crates.io/api/v1/crates?q=..., requires a descriptive User-Agent per their crawler policy), which makes a clean, scrape-free engine adapter for the code vertical.

Where to look

  • Reference adapter: src/search/engines/mojeek.ts (the SearchEngine interface) or src/search/engines/hn-algolia.ts (API-based)
  • Register in src/search/core/verticals/code.ts

Acceptance

  • New src/search/engines/crates-io.ts, registered in the code vertical
  • Sets a descriptive User-Agent (crates.io policy)
  • Respects timeoutMs / maxResults; unit test included
  • npm test and npm run lint green

KnockOutEZ avatar Jul 05 '26 20:07 KnockOutEZ