Skip to main content

Module run_package

Module run_package 

Source

ConstantsΒ§

CAP_REGISTER_TIMEOUT πŸ”’
CMD_INIT_DELIVERY πŸ”’
POLL_INTERVAL πŸ”’
RBNX_INVOCATION_CWD πŸ”’
Directory against which relative -p is resolved: the pwd of the command invocation. When cargo run runs from robonix/rust, the process cwd is not the user’s shell cwd β€” wrappers should export RBNX_INVOCATION_CWD="$(pwd)" before cd+cargo run. If unset, std::env::current_dir() is used.

FunctionsΒ§

build_deploy_manifest πŸ”’
Build every package referenced by a top-level robonix_manifest.yaml. Two phases:
build_start_config_json πŸ”’
Materialize a per-instance config from --config <file> plus repeatable --set k.v=val overrides. Returns the merged JSON string, or None when neither input was provided.
call_driver_init πŸ”’
Send Driver(CMD_INIT, config_json) to a known provider’s */driver gRPC capability. Mirrors deploy.rs’s call_driver_cmd but inlined to keep run_package.rs free of cross-module coupling.
contract_id_to_service_name πŸ”’
robonix/primitive/chassis/move β†’ RobonixPrimitiveChassisMove. mycomp/a/b/c β†’ MycompABC. Uniform PascalCase per /-segment; no prefix stripping.
drive_cmd_init_after_register πŸ”’
Wait for the new provider (any provider not in before) to appear in atlas with a */driver gRPC capability, then call Driver(CMD_INIT, config_json). One package = one provider. Gives up after 60s; rbnx start keeps the package running regardless.
execute_build
execute_start
find_package_from_cwd πŸ”’
Walk up from the invocation cwd looking for a directory that contains a package_manifest.yaml. Returns the first match.
merge_dotted πŸ”’
Set obj[a][b][c] = v for a dotted key like "a.b.c". Creates intermediate objects as needed; bails on a non-object collision.
path_base_for_dash_p πŸ”’
resolve_local_path_for_filesystem πŸ”’
Resolve -p to a filesystem path before canonicalize: relative paths and . use path_base_for_dash_p as the prefix (invocation pwd, or process cwd).
resolve_package_path πŸ”’
Resolve package path from -p (local path) or -g (system-installed name). When neither is given, walk up from cwd to find a package manifest.
resolve_package_path_for_start πŸ”’
Resolve package path for start: same -p rules as build, then system-installed name fallback.
shell_escape πŸ”’
POSIX-shell single-quoted escape, used when we synthesise export FOO=... fragments to inject into a package’s start body.