Skip to main content

init_with_launch_auto

Function init_with_launch_auto 

Source
pub fn init_with_launch_auto() -> Result<Context, InitError>
Expand description

Pattern 2 — launch-aware init.

Resolves the launch file via:

  1. $NROS_RUNTIME_OVERLAY — when set, the path points at a JSON sidecar written by nros launch --emit-runtime-overlay. (NOT yet consumed; placeholder for the follow-up wave.)
  2. <CARGO_MANIFEST_DIR>/launch/<pkg>.launch.xml or <CARGO_MANIFEST_DIR>/launch/system.launch.xml. (NOT yet parsed; placeholder.)
  3. The env vars described in init — the launcher projects launch params into the child env before exec(), so the env path is the de-facto launch overlay today.

Returns a Context whose source = ContextSource::Launch so callers can introspect whether the run is launch-driven.