-
Notifications
You must be signed in to change notification settings - Fork 0
ci(release): publish library crate to crates.io via Trusted Publishing #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # code-search-please (`csp`) | ||
|
|
||
| Hybrid code search for agents — the core Rust library behind [`@pleaseai/csp`](https://github.com/pleaseai/code-search). A Rust rewrite of [MinishLab/semble](https://github.com/MinishLab/semble). | ||
|
|
||
| > Published to crates.io as **`code-search-please`** (the short name `csp` was taken). The library name is `csp`, so you still write `use csp::...`. | ||
|
|
||
| ## Install | ||
|
|
||
| ```toml | ||
| [dependencies] | ||
| code-search-please = "0.1" | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```rust | ||
| use std::path::Path; | ||
| use csp::indexing::index::{CspIndex, LoadOptions, QueryOptions}; | ||
|
|
||
| // Index a local directory and search it | ||
| let index = CspIndex::from_path(Path::new("./my-project"), &LoadOptions::default())?; | ||
| let results = index.search("save model to disk", &QueryOptions { top_k: Some(3), ..Default::default() }); | ||
|
|
||
| for r in &results { | ||
| println!("{}:{}-{}", r.chunk.file_path, r.chunk.start_line, r.chunk.end_line); | ||
| } | ||
| # Ok::<(), String>(()) | ||
| ``` | ||
|
|
||
| Hybrid scoring combines Model2Vec dense embeddings with BM25, fused via Reciprocal Rank Fusion. Chunking is tree-sitter AST-based with a line-based fallback. | ||
|
|
||
| ## CLI / MCP | ||
|
|
||
| The `csp` binary (CLI + MCP server) ships via npm (`bunx @pleaseai/csp`) and Homebrew. See the [repository README](https://github.com/pleaseai/code-search) for the full surface. | ||
|
|
||
| ## License | ||
|
|
||
| MIT. This is a derivative work of [MinishLab/semble](https://github.com/MinishLab/semble); see the repository for credits and citation. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MEDIUM] README의 사용 예제가 컴파일되지 않습니다.
문제점:
?연산자는Result를 반환하는 함수 내에서만 사용할 수 있습니다. 현재 코드 조각은 함수로 감싸여 있지 않아cargo test --doc실행 시 컴파일 오류가 발생합니다.근거: Rust 문서 테스트는 유효하고 컴파일 가능한 코드 예제를 제공해야 합니다. 이는 라이브러리 사용자가 예제를 복사하여 붙여넣고 바로 사용할 수 있도록 보장합니다.
제안:
rustdoc이 테스트할 수 있도록 예제 코드를 숨겨진main함수로 감싸는 것을 제안합니다. 이렇게 하면 문서의 가독성을 해치지 않으면서 코드의 정확성을 보장할 수 있습니다. 또한, 예제를 실행하기 위해 필요한 설정(예: 디렉토리 생성)에 대한 주석을 추가하는 것이 좋습니다.