Skip to content
Display syntax-diagrams for Rust-macros on docs.rs and doc.rust-lang.org
Branch: master
Clone or download
Latest commit 71db14b Mar 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
extension
var
.gitignore Add integration tests Mar 8, 2019
.travis.yml Add travis Mar 10, 2019
LICENSE
README.md

README.md

Build Status

A WebExtension compatible with Chrome and Firefox to display syntax-diagrams for Rust's macro_rules!() on docs.rs and doc.rust-lang.org.

A pre-built version for Chrome is published here, for Firefox here

Screenshot

The extension uses macro_railroad to generate diagrams. The diagrams are shown beneath each macro-block. Use the icons in the lower right corner to control options and expand the diagram to fullscreen.

To modify and build the extension locally:

  • Install the cargo-web binary from crates.io
  • Use ext/Makefile to re-build the Rust-parts. The javascript-shim built by cargo-web currently needs a little patching which the Makefile takes care of.
  • Go to "about:debugging" (Firefox) or "chrome://extensions" (Chrome) and use "Load temporary Add-on"/"Load local extension" with manifest.json to load the extension.
  • Having made changes, re-execute make to rebuild the Rust-parts, reload the extension.
You can’t perform that action at this time.