2. Build a command-line application
Create the next project in the Archer story:
longbow new archer-greetcd archer-greetIts only command accepts one name. This keeps parsing at the entry point and makes every outcome observable through stdout, stderr, and the exit status.
module main;
@imports :: lib::std::fmt :: lib::std::os::arguments;
i32 main() { values, captureError := arguments::capture(); if captureError != none { fmt::eprintln("archer-greet: cannot capture arguments"); return 3; } if values.len() != 2 { fmt::eprintln("usage: archer-greet <name>"); return 2; } fmt::println("Welcome, ", values[1].view(), "!"); return 0;}longbow checklongbow run -- FaunaWelcome, Fauna!Longbow forwards values after -- without a shell and returns the program’s
status. The qualified fixture also runs with no name and verifies status 2
and the exact usage diagnostic.