Skip to content

feat: add lib.rs and fix rust-cache in CI#83

Merged
sonesuke merged 1 commit intomainfrom
feat/lib-crate-and-cache-fix
Apr 12, 2026
Merged

feat: add lib.rs and fix rust-cache in CI#83
sonesuke merged 1 commit intomainfrom
feat/lib-crate-and-cache-fix

Conversation

@sonesuke
Copy link
Copy Markdown
Owner

Summary

  • Add src/lib.rs to expose core, cli, and mcp modules as a library crate, enabling external crates to use google-patent-cli as a dependency
  • Simplify src/main.rs to delegate to the library
  • Remove incorrect workspaces: google-patent-cli from Swatinem/rust-cache in CI and Release workflows — this project is a single crate, not a Cargo workspace, so the cache was never hitting

Test plan

  • cargo build — both lib and bin compile
  • cargo test — all 30 tests pass (17 unit + 9 CLI e2e + 4 MCP e2e)
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo fmt -- --check — clean
  • CI workflow cache hit improves after merge

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@sonesuke sonesuke merged commit 02b92fd into main Apr 12, 2026
4 checks passed
@sonesuke sonesuke deleted the feat/lib-crate-and-cache-fix branch April 12, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants