extern crate pluribus;
use pluribus::pluribus;
mod greet {
pub fn start(args: &[String]) {
for s in &args[1..] {
println!("Greetings, {s}!");
}
}
}
mod bye {
pub fn start(args: &[String]) {
for s in &args[1..] {
println!("Goodbye, {s}!");
}
}
}
fn main() -> std::io::Result<()> {
pluribus!(
symbol: start;
returns: ();
with:
- greet;
#[cfg(target_family = "unix")]
- bye;
)
(&std::env::args().skip(1).collect::<Vec<_>>());
Ok(())
}