wavedrom-rs
wavedrom-rs copied to clipboard
Beautiful Digital Timing Diagrams with Rust
wavedrom-rs 
A Rust Digital Timing Diagram generator based on WaveDrom
The wavedrom-rs crate provides an interface to shape beautiful Digital Timing
Diagrams into an SVG. It is almost completely compatible with the
WaveDrom project. It can be merged into document build tools,
continuous integration or be used as a one off to generate beautiful
diagrams.
There are currently four ways to use wavedrom-rs:
- On the editor website
- As a Rust crate
- As a Command-Line Application
- As a MdBook Preprocessor
Features
- [x] All original WaveDrom Signal Types
- [x] Signal Groups
- [x] Arrows and Indicator Markers
- [x] Headers and Footers
- [x] Cycle Enumeration Markers
- [x] Editor Website through WASM
- [x] MdBook Preprocessor
- [x] Full Customization via Skins
Documentation
This project uses the same syntax for WaveJson as the original WaveDrom project. Therefore, the original Hitchhiker's Guide to WaveDrom is still a good introduction into several concepts of of WaveJson. Additionally, this repository maintains a reference book.
Testing
Tests are written in the ./tests directory and can be generated
using the ./tests/run.py scripts. This will generate a
result.html in the tests directory that contains all the rendered SVGs for
each json5 file in the ./tests directory.
# Usage:
cd ./tests
./run [path/to/skin.json5]
Fuzzing
This project is fuzzed with cargo-fuzz. This improves the
stability of the project.
cargo +nightly fuzz run wavejson-render
MSRV
This crate currently only compiles with Rust 1.70. To select that version use:
rustup update 1.70 --no-self-update && rustup default 1.70
Contribution
Please report any bugs and possible improvements as an issue within this repository. Pull requests are also welcome.
License
Licensed under a MIT License. The demo website utilizes icons from Lucide which are licensed under an ISC license.