blob: 0f93a8de2637fa267e48d16d0e0da2f2bf9761b8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
//! Example: Module Pathfinder (pathf)
//!
//! > This example demonstrates how to use the `pathf` feature to define types
//! > in submodules without needing explicit `use` in the main module.
//! > All type paths are resolved automatically at build time.
//!
//! Run:
//! ```bash
//! cargo run --manifest-path examples/example-pathfinder/Cargo.toml --quiet -- greet
//! cargo run --manifest-path examples/example-pathfinder/Cargo.toml --quiet -- greet Alice
//! ```
//!
//! Output:
//! ```plaintext
//! Hello, World!
//! Hello, Alice!
//! ```
mod sub;
use mingling::macros::gen_program;
use crate::sub::CMDGreet;
fn main() {
let mut program = ThisProgram::new();
program.with_dispatcher(CMDGreet);
program.exec_and_exit();
}
gen_program!();
|