Fork of https://github.com/0xPARC/pod2
Migrate fmt to use Display trait to simplify the usage of it.
Also with this, in the same snipped of code we can print types from
backend, middleware and frontend; which before needed to import the two
different `Printer` structs (frontend::Printer and mock_main::Printer).
Before:
```
let printer = mock_main::Printer { skip_none: false };
let mut w = io::stdout();
printer.fmt_mock_main_pod(&mut w, &pod).unwrap();
let printer = frontend::Printer { skip_none: false };
printer.fmt_main_pod_builder(&mut w, &pod_builder).unwrap();
```
now:
```
println!("{:#}", pod);
println!("{:#}", pod_builder);
```
And the equivalent to the old `skip_none: true`, now is done by just
using `println!("{}", pod);
|
||
|---|---|---|
| .github/workflows | ||
| book | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| README.md | ||
| rust-toolchain.toml | ||
POD2
Usage
- Run tests:
cargo test --release
Book
The book contains the specification of POD2. A rendered version of the site can be found at: https://0xparc.github.io/pod2/
To run it locally:
- Requirements
- mdbook:
cargo install mdbook - mdbook-katex:
cargo install mdbook-katex
- mdbook:
- Go to the book directory:
cd book - Run the mdbook:
mdbook serve