1# rete-draw 2 3A [`rete`](../rete/) network as an SVG picture, from the network that runs: 4facts on the left, the tests on them, the joins where a rule's tests meet, and 5the rules on the right, with what is known marked on it (filled is what a rule 6that holds stands on, outlined was learned and not needed, dashed failed), the 7rules that decided a step numbered in order, and a line from a rule back round 8to the fact its effect teaches. 9 10It is its own crate so that `rete` stays free of presentation. A host draws 11with `rete(network, known, fired, legend, shown, link)`, which returns markup 12(`maud`) to put in a page, or with `standalone(network, legend, style)`, which 13returns a file. The host says what only it can: a `Legend` of the frames to 14draw round facts that arrive together, and how a rule's effect reads in words. 15`shown` prints a number beside a known fact, and `link` makes facts and tests 16clickable. 17 18The markup carries classes and no styles; `src/lib.rs` lists them. `standalone` 19puts the stylesheet the host passes in the file, because an image is drawn 20without the page's. 21 22| File | What | 23|---|---| 24| [`src/lib.rs`](src/lib.rs) | The drawing, `sequence`, and `standalone`. | 25| [`src/tests.rs`](src/tests.rs) | The drawing of a small domain of its own. | 26 27Run the tests with `mise run test` from the repository root.