1 unstable release

0.1.0 Mar 8, 2023

#1301 in Procedural macros

21 downloads per month

MIT/Apache

6KB
83 lines

p5doc

main

p5.js diagram within rustdoc

Example

This crate introduces a proc-macro #[p5doc::p5doc], which converts p5doc inline code in Markdown into a HTML flagment with p5.js script:

#[cfg_attr(doc, p5doc::p5doc)]
/// Some function!
///
/// Before
///
/// ```p5doc:200x100
/// background(220);
/// ellipse(50,50,80,80);
/// ```
///
/// After
///
pub fn some() {}

This will be displayed as following:

image

See the document on GitHub Pages and its code.

License

© 2023 Toshiki Teramura (@termoshtt)

This project is licensed under either of

at your option.


lib.rs:

p5doc proc-macro

Dependencies

~3–4.5MB
~88K SLoC