Skip to content

docs: update README for the Rust port - #44

Merged
amondnet merged 2 commits into
mainfrom
docs/readme-rust-port
Jun 22, 2026
Merged

docs: update README for the Rust port#44
amondnet merged 2 commits into
mainfrom
docs/readme-rust-port

Conversation

@amondnet

@amondnetamondnet commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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.md and README.ko.md (kept in sync).

Changes

  • Intro callout + Credits: TypeScript/Bun portRust port.
  • Homebrew / distribution notes: binary is cargo build --release (no runtime for the Homebrew build); the npm path runs the same binary behind a Node launcher (needs Node 22+/Bun on PATH).
  • Features: Bun-nativesingle self-contained Rust binary.
  • Library usage: the npm package is binary-only (no JS API now), so the old import { CspIndex } from '@pleaseai/csp' block is removed. Reframed around the Rust csp crate (crates/csp) with a minimal example; notes crates.io publishing is planned.
  • Development: bun install/run build/testcargo build/test/fmt/clippy.

Kept as-is (still valid)

  • bunx @pleaseai/csp / npm/bun/pnpm install commands — the npm launcher still works that way.

Notes

  • The Rust example uses the verified public API (csp::indexing::index::CspIndex::from_path / search).
  • crates.io publishing referenced here is tracked as a separate follow-up.

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.

  • Migration
    • @pleaseai/csp is binary-only; the JavaScript API was removed. Delete import { CspIndex } from '@pleaseai/csp'.
    • Use the Rust crate csp from crates/csp via path or git until it's on crates.io; examples updated to compile (Path::new, top_k: Some(3)).
    • Homebrew installs a self-contained binary (no runtime). The npm/bun/pnpm path runs the same binary via a launcher and requires Node 22+ or Bun on your PATH.

Written for commit d4e10d3. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Updated product documentation to emphasize the Rust implementation instead of TypeScript/Bun
    • Clarified distribution expectations: Homebrew ships a self-contained binary; npm packages require Node 22+ or Bun
    • Refreshed “Library usage” examples and updated “Development” commands to use Rust/Cargo workflows

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.
@coderabbitai

coderabbitaiBot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2736b70b-2e50-44df-9f01-aa3a58cf2363

📥 Commits

Reviewing files that changed from the base of the PR and between 42f6afd and d4e10d3.

📒 Files selected for processing (2)
  • README.ko.md
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.ko.md

📝 Walkthrough

Walkthrough

Both README.md and README.ko.md are updated in parallel to reflect that csp is now a Rust port. Changes cover the top-level project description, the "Main Features" bullet, installation runtime notes, the library usage API examples, and the development workflow commands and credits section.

Changes

README Rust migration

Layer / File(s)Summary
Top-level description and main features bullets
README.md, README.ko.md
Top-level port description changed from TypeScript/Bun to Rust in both files; "Bun-native" main features bullet replaced with "single binary (self-contained Rust executable)".
Installation runtime requirements
README.md, README.ko.md
Homebrew formula described as shipping a self-contained Rust binary with no runtime dependency; npm/bun/pnpm packages described as launcher-based, requiring Node 22+ or Bun on PATH; index cache location (~/.csp/) and ADR link clarified.
Library usage section rewrite
README.md, README.ko.md
TypeScript/JavaScript API example (@pleaseai/csp, CspIndex.fromPath/fromGit, ContentType) removed and replaced with a Rust crate example using CspIndex::from_path, search, find_related, LoadOptions, and QueryOptions; crates.io publication status noted, npm package described as binary-only with no JS API.
Development commands and Credits
README.md, README.ko.md
bun build/test/lint commands replaced with cargo build --release, cargo test --workspace, cargo fmt, and cargo clippy; Credits text updated from TypeScript port attribution to Rust port attribution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hoppin' through the README files,
Swapping Bun for Rust all the while,
cargo build where bun once ran,
A single binary, part of the plan.
From TypeScript roots to Rust we go—
This rabbit's proud of the crates, you know! 🦀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title 'docs: update README for the Rust port' directly and clearly summarizes the main change—updating documentation to reflect the transition to a Rust port.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/readme-rust-port

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production

codacy-productionBot commented Jun 22, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment threadREADME.ko.md Outdated
Comment threadREADME.md Outdated
@codecov

codecovBot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cubic-dev-aicubic-dev-aiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment threadREADME.ko.md Outdated
Comment threadREADME.md Outdated
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)
@amondnet
amondnet merged commit 9c8fe50 into mainJun 22, 2026
7 checks passed
@amondnet
amondnet deleted the docs/readme-rust-port branch June 22, 2026 13:48
Sign up for freeto 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.

1 participant

@amondnet