Git Product home page Git Product logo

macro_railroad_ext's Introduction

Clippy, Format & Test

A WebExtension compatible with Chrome, Firefox and Edge to display syntax-diagrams for Rust's macro_rules!() on docs.rs, doc.rust-lang.org and all other pages generated by rustdoc.

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

macro_railroad_ext is also integrated into Rust Search Extension


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 wasm-pack binary from crates.io.
  • The package in wasm_src can be executed via wasm-pack build -t no-modules to build destination wasm package, although the Makefile usually takes care of that.
  • make test executes the integration tests; Chrome is required.
  • make screenshots takes a couple of screenshots on common pages for visual inspection; Chrome is required.
  • make playground builds the extension from source and starts a blank-profile Chrome with the extension loaded; press ctrl+c to quit.
  • make packed.zip builds the extension's compressed archive, which can be loaded into a browser as a temporary extension.
  • Go to "about:debugging" (Firefox) or "chrome://extensions" (Chrome) and use "Load temporary Add-on"/"Load local extension" with manifest.json/packed.zip to load the extension.

Note: The only reason this extension requests access to file:///* is local documentation; no data is ever transferred. You may need to enable "Allow access to file URLs" in Chromium-based browsers to use the extension with local documentation.

macro_railroad_ext's People

Contributors

folyd avatar lukaslueg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.