webtools-fetch
Token-efficient web content fetcher with reference-style URL preservation,
part of webtools. Instead of
stripping links to their domain (losing the source) or expanding full URLs
inline (wasting tokens), links become compact [N] markers collected into a
recoverable reference block.
Published on crates.io as
webtools-fetch; the library import name iswebfetch.
[]
= { = "webtools-fetch", = "0.1" }
use ;
// Offline: convert HTML without network I/O.
let opts = FetchOptions ;
let result = convert_html;
println!; // text with [N] markers
for r in &result.references
// Network: fetch + convert with retry/backoff.
let result = fetch_and_convert.await?;
Output formats: text (reference-style, default), markdown (inline links),
structured (JSON blocks + references array).