From a7e29e608258e2a032e6aa45ea46d295254fed42 Mon Sep 17 00:00:00 2001 From: "Claude Sonnet 4.6" Date: Sun, 12 Apr 2026 03:29:22 +0000 Subject: [PATCH] feat: add lib.rs and fix rust-cache in CI workflows Split into lib + bin crate structure so core, cli, and mcp modules are available as a library for external crates. Also remove the incorrect `workspaces` parameter from Swatinem/rust-cache since this is a single crate, not a Cargo workspace. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 2 -- .github/workflows/release.yml | 4 ---- src/lib.rs | 3 +++ src/main.rs | 6 +----- 4 files changed, 4 insertions(+), 11 deletions(-) create mode 100644 src/lib.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 985e271..349b762 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,6 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - with: - workspaces: google-patent-cli - name: Check formatting run: cargo fmt -- --check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c4db27..6617945 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,8 +23,6 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - with: - workspaces: google-patent-cli - name: Setup Chrome configuration run: | @@ -116,8 +114,6 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v2 - with: - workspaces: google-patent-cli - name: Install cross if: matrix.use_cross == true diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..f83e98c --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,3 @@ +pub mod cli; +pub mod core; +pub mod mcp; diff --git a/src/main.rs b/src/main.rs index dafc35a..1e764cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,4 @@ -pub mod cli; -pub mod core; -pub mod mcp; - #[tokio::main] async fn main() -> anyhow::Result<()> { - cli::run().await + google_patent_cli::cli::run().await }