Skip to main content

Module runner

Module runner 

Source
Expand description

Spawn-side companions to super::thin_build::build_obj_plan and super::link_plan::build_link_plan.

Two stages, one helper that wires them together:

  • run_obj_plan — invoke rustc with an ObjBuildPlan and return the path of the emitted object file.
  • run_link_plan — invoke the linker driver with a LinkPlan and return the path of the produced .so / .dylib.
  • thin_rebuild_obj — composes both: build the obj plan, spawn rustc, build the link plan, spawn the linker, return the dylib path.

All three inherit stdout/stderr so compile / link errors land in the dev-server’s terminal instead of being swallowed.

Functions§

run_link_plan
Spawn the linker driver with plan.args from cwd. On success, returns the path of the produced shared object (= plan.output).
run_obj_plan
Spawn rustc with plan.args from cwd. On success, returns the path of the emitted object (= plan.expected_object).
thin_rebuild_obj
Compose run_obj_plan and run_link_plan into the full hot-patch rebuild.