-
Notifications
You must be signed in to change notification settings - Fork 398
Description
Request
Would it be possible to split the crate into a lib.rs + bin.rs so that other Rust projects can depend on gws as a library?
Use case
I'm building a Rust application that interacts with Google Drive (and potentially other Workspace APIs). Currently the only integration path is shelling out to gws as a subprocess, which adds overhead and loses type safety.
If gws exposed its core functionality — authentication, Discovery Service client, request execution — as a library crate, Rust projects could depend on it directly:
[dependencies]
gws = { git = "https://github.com/googleworkspace/cli" }The dynamic Discovery-based approach is exactly what makes this project compelling as a library — rather than hand-rolling clients for each Google API, downstream crates could reuse the same infrastructure.
Suggested structure
A minimal split might look like:
src/lib.rs— auth, discovery client, request execution, response typessrc/main.rs— CLI parsing, output formatting (useslib.rs)
No API changes needed to the CLI itself.