wobblechar
Parse ASCII/UTF-8 waveform diagrams into a stream of decoded samples.
wobblechar creates a bridge between the human-friendly world of text waveforms
and the structured data needed for programmatic processing. It was born out of the
need to make testing less tedious and more intuitive.
CLK: _|‾|_|‾|_
DAT: ___|‾‾‾|_
Getting started
Add to your Cargo.toml:
[]
= "0.1"
Then parse a waveform:
use Builder;
for item in new_from_string
.with_def_bool_mapper
.build
Default character mapping
| Character | Meaning |
|---|---|
_ |
Low (false / 0) |
| |
Edge — toggles the previous value |
anything else (e.g. ‾, X) |
High (true / 1) |
Custom mappings can be provided via Builder::with_const_bool_map,
Builder::with_const_num_mapper, or (with the std feature) the
HashMap-based variants.
Multi-line labeled format
Lines can carry a label prefix (Name: content) to allow non-contiguous
continuation across blocks. This is useful when interleaving multiple signals:
CLK: _|‾|_|‾|_ # clock
DAT: ___|‾‾|__ # data
# some comment
CLK: |‾|_|‾|_ # clock continued
DAT: __|‾‾‾|_ # data continued
no_std support
wobblechar is no_std by default and works in embedded environments.
Enable the std feature for HashMap-backed mappers:
[]
= { = "0.1", = ["std"] }
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.