Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upExpose diesel_cli's functionality as a library #357
Comments
This comment has been minimized.
|
It would probably make sense for CLI to expose a reasonable public API there. /cc @mcasper |
jimmycuadra
referenced this issue
Jun 17, 2016
Open
Create test database and run migrations from Rust #67
This comment has been minimized.
travismiller
commented
Jul 16, 2018
|
Would something like this work? This PoC just exposes a // diesel database setup
diesel_cli::run(vec!["database", "setup"]);The crux of this uses https://docs.rs/clap/2.32.0/clap/struct.App.html#method.get_matches_from It probably makes more sense to use https://docs.rs/clap/2.32.0/clap/struct.App.html#method.get_matches_from_safe so that an API user could handle a result. |
This comment has been minimized.
|
That would certainly be the easiest to implement, but I'd rather just have a more static API akin to libgit2 vs git |
igalic
referenced this issue
Sep 17, 2018
Closed
Expose multi-db connection inference from diesel-cli #1853
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jimmycuadra commentedJun 16, 2016
Would it be possible to expose the functionality of diesel_cli as a Rust library? I'd like to be able to programmatically perform
diesel database setupfrom Rust without shelling out.