Extract the CLI logic from src/main.rs into src/lib.rs, expose public entry points (run_pipeline, Network, Request, cost models), and keep a tiny binary wrapper so downstream tools can call the same code. This should enable bindings to feed configs and requests in memory while leaving the existing CLI behavior unchanged according to my understanding.
Context: I'm interested in R and Python interfaces to Rust via extendr, savvy and pyo3 and believe these changes are a pre-requisite.
Extract the CLI logic from src/main.rs into src/lib.rs, expose public entry points (run_pipeline, Network, Request, cost models), and keep a tiny binary wrapper so downstream tools can call the same code. This should enable bindings to feed configs and requests in memory while leaving the existing CLI behavior unchanged according to my understanding.
Context: I'm interested in R and Python interfaces to Rust via extendr, savvy and pyo3 and believe these changes are a pre-requisite.