Skip to main content

main

Macro main 

Source
main!() { /* proc-macro */ }
Expand description

One-line fn main() for Entry pkgs. Four forms:

nros::main!();                                          // single-node self-bringup
nros::main!(board = NativeBoard);                       // single-node, explicit board
nros::main!(launch = "demo_bringup");                   // multi-node, default launch
nros::main!(launch = "demo_bringup:sim.launch.xml");    // multi-node, explicit file
nros::main!(
    board  = NativeBoard,
    launch = "demo_bringup:sim.launch.xml",
    args   = [("use_sim", "true")],
);

Reads [package.metadata.nros.entry] deploy = "<board>" from the Entry pkg’s own Cargo.toml when board = … is absent; consults the workspace pkg-index (Phase 212.N.10) to resolve the bringup pkg’s launch file (Phase 212.N.11 parser).

Emits fn main() that delegates to <Board as ::nros::__macro_support::nros_platform::BoardEntry>::run(...), dispatching one <pkg>::register(runtime)?; call per launch-XML <node> entry. See docs/design/0024-multi-node-workspace-layout.md §11.6 for the design lock.