Skip to content

Instantly share code, notes, and snippets.

@thepacketgeek
Created January 4, 2022 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thepacketgeek/9e2cae54054e710867eb09ce9fb0915d to your computer and use it in GitHub Desktop.
Save thepacketgeek/9e2cae54054e710867eb09ce9fb0915d to your computer and use it in GitHub Desktop.
Host `cargo doc` in HTTP server
#!/bin/bash
set -o errexit
pushd `BROWSER=echo cargo doc --open | sed "s/\/doc\/.*/\/doc\//"` && python -m http.server; popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment