feat: add cli to output for graphviz#344
feat: add cli to output for graphviz#344stringhandler wants to merge 1 commit intoBlockstreamResearch:masterfrom
Conversation
98e05a7 to
cac856d
Compare
|
It seems that Github has built in support for mermaid diagrams, so I might add an option to export to flowchart TD
node0["unit"]
node1["word(0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)"]
node2["comp"]
node3["iden"]
node4["pair"]
node5["iden"]
node6["take"]
node7["unit"]
node8["jet(sig_all_hash)"]
node9["comp"]
node10["pair"]
node11["witness"]
node12["pair"]
node13["jet(bip_0340_verify)"]
node14["comp"]
node15["comp"]
node2 --> node0
node2 --> node1
node4 --> node2
node4 --> node3
node6 --> node5
node9 --> node7
node9 --> node8
node10 --> node6
node10 --> node9
node12 --> node10
node12 --> node11
node14 --> node12
node14 --> node13
node15 --> node4
node15 --> node14
|
|
The actual command also might be better suited for |
|
Nice one @stringhandler , I do think this fits better in hal-simplicity |
|
Although on second thought it does seem fine in the CLI here 🤷 |
|
Ok, agreed. I'll leave the logic here, since it is the same place as the other DisplayExpr trait, but move the CLI logic to hal |
|
CI breakage looks unrelated (seems we need to update the pins in Concept ACK adding this to |
|
Super cool that we can just inline the logic and don't need a dependency or anything! I am a liiitle concerned about the exponential blowup inherent to this, but I think it's okay for now. The CLI tool may want to stick a guard on it and refuse to output more than 2^24 nodes or something without an extra --force flag. |
Add a CLI command for outputting a binary program to
.dotlanguage, AKA graphviz.The main reason is to easily compare programs created from SimplicityHL.
For example:
cargo run -- graph 4Am0vN8zP3zuXdYq0DFK50OFg4FN/m2W5xRsrPlArYt8C8wCEChBieAgWBxRsYCAawA=will output