One file, no crates: a TcpListener from the standard library answers every request with the docs
page. The Redoc bundle comes from the jsDelivr CDN and the API description from a URL.
cargo runThen open http://localhost:8080.
src/main.rs— the response is a<redoc spec-url>tag plus one script tag. That is all Redoc needs; in a real app the same HTML goes into whatever web framework you use.DEFAULT_REDOC_URLis where the bundle is loaded from; theREDOC_URLenvironment variable overrides it, for self-hosting or pinning another version.CAFEis where your API description lives — any URL the browser can fetch.
docker build -f docker/Dockerfile -t redoc-rust .
docker run --rm -p 8080:8080 redoc-rust