Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Nov 22, 2014

This will currently call out to the registry service. In the future it may be sensible to add package descriptions to the git index so that search can be done offline.

Closes #925.

@ghost
Copy link
Author

ghost commented Nov 22, 2014

This is rebased on top of #956.

@alexcrichton
Copy link
Member

Could you post a sample of the output as well? This looks great, thanks @jakub-!

@ghost
Copy link
Author

ghost commented Nov 23, 2014

@alexcrichton Of course!

[jakub@jakub cargo (cargo-search ✗)]$ ./target/cargo search foo
    Updating registry `https://github.com/rust-lang/crates.io-index`
hoare (0.1.1)          Design by contract style assertions for Rust
tinycdb (0.0.3)        Bindings to the TinyCDB C library (http://www.corpit.ru/mjt/tinycdb.html)
memcache (0.0.4)       memcached client for rust
lazy_static (0.1.1)    A macro for declaring lazily evaluated statics in Rust.
flate2 (0.0.3)         Bindings to miniz.c for DEFLATE compression and decompression exposed as Reader/Writer streams. Contains bindings for zlib, def…
json_macros (0.0.2)    Convenience macros for constructing JSON objects from literals.

Hmm, I'm not sure why we're getting all these results for foo but I presume some fields other than name and description get full text indexed. This makes the results a tad less useful but I think it's valuable to at least search in descriptions.

@ghost
Copy link
Author

ghost commented Nov 23, 2014

@alexcrichton Updated. Your comments got lost due to my rebase but I fixed the command --help and renamed ExistingCrate to Crate.

@alexcrichton
Copy link
Member

r+, gonna wait on #956 though.

@ghost
Copy link
Author

ghost commented Nov 24, 2014

@alexcrichton r? if you're still happy with this? :-)

bors added a commit that referenced this pull request Nov 24, 2014
This will currently call out to the registry service. In the future it may be sensible to add package descriptions to the git index so that search can be done offline.

Closes #925.
@bors bors merged commit 0c25226 into rust-lang:master Nov 24, 2014
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.

cargo search or similar

2 participants