1macro_rules! walkthroughs {
11 ($($name:ident => ($title:literal, $description:literal)),+ $(,)?) => {
12 macro_rules! navigation {
13 () => {
14 concat!(
15 "<script>(() => { const examples = [",
16 $("[\"", stringify!($name), "\",\"", $title, "\"],",)+
17 "];", include_str!("../docs/example-navigation.js"), "})();</script>"
18 )
19 };
20 }
21
22 #[doc = concat!(
23 "Worked examples, from counting to compiling on a vtree of your choice.\n\n",
24 $("1. [", $title, "](examples::", stringify!($name), ") — ", $description, "\n",)+
25 )]
26 #[doc = navigation!()]
27 pub mod examples {
28 $(
29 #[doc = include_str!(concat!("../docs/examples/", stringify!($name), ".md"))]
30 #[doc = "<style>.example-wrap.ignore:has(> pre.tested-example) > .tooltip { display: none; }</style>"]
32 #[doc = navigation!()]
33 pub mod $name {}
34 )+
35 }
36 };
37}
38
39walkthroughs! {
40 catalog => ("Product configurations", "Count the configurations rules allow, project them, and keep the circuit."),
41 reliability => ("Network reliability", "Weigh assignments by probabilities to find how likely two sites stay connected."),
42 circuits => ("Distinct outputs", "Encode a multiplier as clauses and count the products it outputs."),
43 vtree_choice => ("Choosing a vtree", "Compile one formula on several vtrees and compare the circuits."),
44}
45
46#[doc = include_str!("../docs/library-integration.md")]
47pub mod library_integration {}
48
49#[doc = include_str!("../docs/architecture.md")]
50pub mod architecture {}