docs: update README for the Rust port#44
Conversation
The shipped product is now the Rust port (distributed as a self-contained binary via Homebrew + npm), not the TypeScript/Bun build. - intro callout + credits: TypeScript/Bun port -> Rust port - Homebrew/distribution notes: cargo-built binary; npm path needs Node/Bun for the launcher - features: 'Bun-native' -> 'single Rust binary' - Library usage: the npm package is binary-only (no JS API); reframe around the Rust 'csp' crate (crates/csp), note crates.io publishing is planned - Development: bun/tsdown commands -> cargo build/test/fmt/clippy README.md and README.ko.md kept in sync.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughBoth ChangesREADME Rust migration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Code Review
This pull request updates both the English and Korean README files to reflect the porting of the csp library from TypeScript/Bun to Rust, replacing Bun/npm usage instructions and TypeScript library examples with Cargo commands and Rust code snippets. The review feedback correctly identifies compilation errors in the newly added Rust example code blocks—specifically, incorrect type usage for CspIndex::from_path and QueryOptions::top_k—and provides appropriate suggestions to fix them.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
2 issues found across 2 files
Architecture diagram
sequenceDiagram
participant User as User/Agent
participant Homebrew as Homebrew
participant NPM as npm/bun/pnpm
participant CLI as csp CLI Binary
participant RustCrate as csp Rust Crate
participant Filesystem as Filesystem
Note over User,Filesystem: Runtime Distribution & Usage Flows
alt Homebrew Install
User->>Homebrew: brew install pleaseai/csp/csp
Homebrew->>CLI: NEW: cargo build --release binary
Note over CLI: Self-contained Rust binary (tree-sitter + embeddings built-in)
Homebrew-->>User: Installs CLI binary (no runtime needed)
User->>CLI: csp index ./my-project
CLI->>Filesystem: Read and index files
CLI-->>User: Return search results
else npm/bun/pnpm Install
User->>NPM: npm install -g @pleaseai/csp
NPM->>CLI: NEW: Ships binary via Node launcher
Note over NPM,CLI: Uses same Rust binary behind small Node launcher
alt Node 22+ or Bun on PATH
User->>CLI: bpx @pleaseai/csp index ./my-project
CLI->>Filesystem: Read and index files
CLI-->>User: Return search results
else Missing runtime
CLI-->>User: Error: Need Node 22+ or Bun on PATH
end
end
Note over User,RustCrate: NEW: Rust Library Usage (direct integration)
User->>RustCrate: Add dependency: csp crate (path/git)
RustCrate->>RustCrate: Import CspIndex, LoadOptions, QueryOptions
User->>RustCrate: CspIndex::from_path("./my-project", &LoadOptions::default())
RustCrate->>Filesystem: Scan, parse, embed files
Filesystem-->>RustCrate: File content
RustCrate-->>User: Index object
User->>RustCrate: index.search("save model to disk", &QueryOptions { top_k: 3 })
RustCrate-->>User: Vec<SearchResult> with chunk metadata
Note over CLI,RustCrate: Development Flow (Cargo workspace)
User->>CLI: cargo build --release
User->>CLI: cargo test --workspace
User->>CLI: cargo fmt --all
User->>CLI: cargo clippy --all-targets --all-features -- -D warnings
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Fix the Rust library example so it compiles (gemini, cubic):
- QueryOptions.top_k is Option<usize> -> top_k: Some(3) (was a bare 3)
- CspIndex::from_path takes &Path -> Path::new("./my-project") with
'use std::path::Path' (str::as_ref is ambiguous across AsRef impls)
The shipped product is now the Rust port (distributed as a self-contained binary via Homebrew + npm), not the TypeScript/Bun build. Updates both
README.mdandREADME.ko.md(kept in sync).Changes
TypeScript/Bun port→Rust port.cargo build --release(no runtime for the Homebrew build); the npm path runs the same binary behind a Node launcher (needs Node 22+/Bun onPATH).Bun-native→single self-contained Rust binary.import { CspIndex } from '@pleaseai/csp'block is removed. Reframed around the Rustcspcrate (crates/csp) with a minimal example; notes crates.io publishing is planned.bun install/run build/test→cargo build/test/fmt/clippy.Kept as-is (still valid)
bunx @pleaseai/csp/npm/bun/pnpminstall commands — the npm launcher still works that way.Notes
csp::indexing::index::CspIndex::from_path/search).Summary by cubic
Update both READMEs to make the Rust port the primary distribution. Clarifies Homebrew and npm paths, replaces JS library examples with the Rust crate, and switches development instructions to Cargo.
@pleaseai/cspis binary-only; the JavaScript API was removed. Deleteimport { CspIndex } from '@pleaseai/csp'.cspfromcrates/cspvia path or git until it's on crates.io; examples updated to compile (Path::new,top_k: Some(3)).npm/bun/pnpmpath runs the same binary via a launcher and requiresNode 22+orBunon yourPATH.Written for commit d4e10d3. Summary will update on new commits.
Summary by CodeRabbit