Merge changes I5a2e2871,I53b1f37e,I693ea16a into main

* changes:
  Split cargo_out into three modules.
  Factor out functions to find package directory.
  Add more doc comments and break up parse_cargo_out function.