cargo_e/
lib.rs

1#![doc = include_str!("../README.md")]
2
3// Re-export std common modules
4pub mod prelude {
5    pub use std::env;
6    pub use std::error::Error;
7    pub use std::fs;
8    pub use std::io;
9    pub use std::path::{Path, PathBuf};
10    pub use std::process::exit;
11    pub use std::process::Child;
12    pub use std::process::Command;
13    pub use std::process::Stdio;
14    pub use std::sync::mpsc;
15    pub use std::sync::{Arc, Mutex};
16    pub use std::time::Instant;
17    //pub use tracing::{debug, error, info};
18    pub use log::{debug, error, info, log_enabled, Level};
19}
20
21pub mod e_findmain;
22pub use e_findmain::*;
23pub mod e_types;
24pub use e_types::*;
25pub mod e_bacon;
26pub use e_bacon::*;
27pub mod e_cli;
28pub use e_cli::Cli;
29pub mod e_manifest;
30pub use e_manifest::{collect_workspace_members, locate_manifest};
31pub mod e_parser;
32pub use e_parser::parse_available;
33pub mod e_runner;
34pub use e_runner::run_example;
35pub mod e_collect;
36pub mod e_command_builder;
37pub mod e_discovery;
38pub mod e_features;
39pub mod e_prompts;
40pub mod e_target;
41pub mod e_tui;
42pub mod e_workspace;
43
44#[allow(unused_macros)]
45macro_rules! doc_with_joke {
46    (
47        $(#[$attr:meta])*
48        $vis:vis fn $name:ident($($arg:tt)*) -> $ret:ty $body:block
49    ) => {
50        $(#[$attr])*                           // Re-emit external doc attributes.
51        #[doc = "Have you read the Guide for You To Read?"] // Extra injected doc comment.
52        $vis fn $name($($arg)*) -> $ret $body    // Emit the function.
53    };
54}
55
56// Define the helper macro.
57// macro_rules! doc_with_funny {
58//     ($doc:expr) => {
59//         #[doc = concat!($doc, "\n\nSee also the [Guide for You To Read](index.html) for more details.")]
60//     };
61// }
62
63// Define the helper macro that captures external attributes and injects an extra doc attribute.
64// macro_rules! doc_with_funny {
65//     (
66//         $(#[$attr:meta])*
67//         $vis:vis fn $name:ident($($arg:tt)*) -> $ret:ty $body:block
68//     ) => {
69//         $(#[$attr])*                           // Re-emit external doc attributes.
70//         #[doc = "Have you read the Guide for You To Read?"] // Extra injected doc comment.
71//         $vis fn $name($($arg)*) -> $ret $body    // Emit the function.
72//     };
73// }
74
75// #[doc = include_str!("../documents/guide.md")]
76// pub mod a_guide {
77//     /// An example constant to force module inclusion.
78//     doc_with_guide!("This function does something important.");
79//     pub const a_const: () = ();
80
81//     /// An example function to force module inclusion.
82//     pub fn a_function() {}
83
84//     /// An example struct to force module inclusion.
85//     pub struct AStruct;
86
87//     /// An example enum to force module inclusion.
88//     pub enum AEnum {
89//         AVariant,
90//     }
91
92//     /// An example trait to force module inclusion.
93//     pub trait ATrait {}
94
95//     /// An example type alias to force module inclusion.
96//     pub type AType = ();
97// }
98
99// // Re-export so the module shows in the public API.
100// pub use a_guide as __THE_GUIDE;
101
102#[macro_use]
103pub mod a_funny_docs;
104
105#[doc = include_str!("../documents/guide.md")]
106pub mod a_guide {
107    // A constant with a humorous aside
108    #[doc = "A wacky constant that reminds you of the fleeting nature of existence—because constants, like our dreams, never change."]
109    #[doc = "Imagine staring into the abyss of an unchanging value and laughing at the cosmic joke: even when everything is fixed, there’s always room for a little absurdity. In a world of mutable chaos, this constant stands as a monument to the absurdity of permanence."]
110    #[doc = "SEE ALSO THE **[GUIDE FOR YOU TO READ](index.html) FOR MORE DETAILS** ON THE MYSTERIES OF CONSTANTS."]
111    pub const A_CONST: () = ();
112    // A function with a humorous aside
113    #[doc = "An eccentric function that performs its task with a whimsical twist."]
114    #[doc = "Picture a function that cracks jokes as it runs—each call a mini stand-up routine where recursion becomes a humorous loop and error handling turns into a comedy of exceptions. This function reminds you that even in logic there is laughter."]
115    #[doc = "SEE ALSO THE **[GUIDE FOR YOU TO READ](index.html) FOR MORE DETAILS** ON THE ART OF FUNCTIONAL HUMOR."]
116    pub fn a_function() {}
117
118    // A struct with a humorous aside
119    #[doc = "A delightfully absurd struct that encapsulates the essence of lighthearted programming."]
120    #[doc = "Think of it as the punchline to a well-crafted joke: simple on the surface yet bursting with hidden layers of wit. This struct is the blueprint for designing data structures that know how to have a good time even when they’re being strictly typed."]
121    #[doc = "SEE ALSO THE **[GUIDE FOR YOU TO READ](index.html) FOR MORE DETAILS** ON STRUCTURING YOUR HUMOR."]
122    pub struct AStruct;
123
124    // An enum with a humorous aside
125    #[doc = "An enum whose variants are as unpredictable as the punchline of an offbeat comedy routine."]
126    #[doc = "Each variant is a different flavor of chaos—a reminder that sometimes, even in the binary world of enums, you need a twist of fate and a pinch of absurdity. Embrace the randomness with a hearty chuckle."]
127    #[doc = "SEE ALSO THE **[GUIDE FOR YOU TO READ](index.html) FOR MORE DETAILS** ON ENUMERATING THE LAUGHTER."]
128    //#[doc = doc_with_funny!("**ENUMERATE THE LAUGHTER:** This enum's variants are as surprising as a punchline in the middle of a monologue. Discover the unexpected twist in every variant.")]
129    pub enum AEnum {
130        #[doc = "A variant that boldly goes where no variant has gone before—capturing the essence of unexpected hilarity."]
131        AVariant,
132    }
133
134    // A trait with a humorous aside
135    #[doc = "A quirky trait that defines behaviors with a tongue-in-cheek twist."]
136    #[doc = "Imagine a trait written by a stand-up comedian: each method is a punchline, each implementation an opportunity for subtle humor. Types implementing this trait are expected not just to act, but to entertain—blending functionality with a dash of wit."]
137    #[doc = "SEE ALSO THE **[GUIDE FOR YOU TO READ](index.html) FOR MORE DETAILS** ON TRAIT-ORIENTED COMEDY."]
138    pub trait ATrait {}
139
140    // A type alias with a humorous aside
141    #[doc = "A type alias that serves as a humorous shortcut to a more verbose reality."]
142    #[doc = "Sometimes types need nicknames too. This alias is like that clever one-liner you whisper at a party—short, memorable, and unexpectedly delightful. It’s the wink in the midst of an otherwise serious type system."]
143    #[doc = "SEE ALSO THE **[GUIDE FOR YOU TO READ](index.html) FOR MORE DETAILS** ON ALIASING THE ORDINARY INTO THE EXTRAORDINARY."]
144    pub type AType = ();
145}
146
147/// If you didn't get it the first time, then look again!  
148/// Check out the **[GUIDE FOR YOU TO READ](theSeachIsOver/index.html)** for all the brilliant details you missed.
149pub use a_guide as theSeachIsOver;