Giter VIP home page Giter VIP logo

rust-search-extension's Introduction

Rust Search Extension

简体中文

The ultimate search extension for Rust

Chrome Web Store Mozilla Add-on Microsoft Edge license-mit license-apache Discord

Search docs, crates, builtin attributes, official books, and error codes, etc in your address bar instantly.

https://rust.extension.sh/

Installation

Features

  • Search Primitive Types and Modules
  • Search Structs, Traits and Enums
  • Search Functions, Methods and Macros
  • Search builtin attributes
  • Search nightly and rustc docs
  • Search crates on https://crates.io or https://lib.rs
  • Search any third-party crate's docs
  • Search Compiler Error Index with error codes
  • Search Rust official book chapters
  • Search Cargo Clippy lints
  • Search Caniuse.rs and RFC
  • Offline mode supported, search local Rust docs (rustup docs --std)
  • Builtin commands (:yet, :book, :stable, :label, :tool, :mirror, :update and :history etc)
  • Docs.rs enhancements (display Feature flags, show table of content)
  • Github rust-lang release page enhancements (show table of content)
  • docs.rust-lang.org enhancements (link all "since" and "issue" label)
  • Support import/export your local data

How to use it

Input keyword rs in the address bar, press Space to activate the search bar. Then enter any word you want to search, the extension will response the related search results instantly.

demonstration.gif

Contribution

jsonnet is required before getting started. To install jsonnet, please check jsonnet's README. For Linux users, the snap is a good choice to install jsonnet.

$ git clone --recursive https://github.com/huhu/rust-search-extension
Cloning into 'rust-search-extension'...
$ cd rust-search-extension

$ make chrome # For Chrome version

$ make firefox # For Firefox version

$ make edge # For Edge version

Get involved

You can contact us on Discord Channel: https://discord.gg/xucZNVd

Miscellaneous

Thanks

Thanks for the sponsorship from these great companies.

rust-search-extension's People

Contributors

benediktwerner avatar c-dao avatar correabuscar avatar dependabot[bot] avatar devin-yeung avatar duskmoon314 avatar eth3lbert avatar folyd avatar francis-du avatar isunjn avatar kaifulee avatar light4 avatar naturellee avatar pcpthm avatar purewhitewu avatar rrbutani avatar shwin0901 avatar stevelauc avatar tmcarr avatar tmfink avatar tversteeg avatar wei-kiki avatar xxchan avatar yescallop avatar zhanghandong avatar zjp-cn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-search-extension's Issues

Opening in new tab should be done with the Alt modifier

In both Firefox and Chrome, Enter opens the address bar thing in the current tab, and Alt+Enter in a new tab. The “Open search result in…” preference should be removed and replaced with this standard mechanism.

I’m using Firefox.

Extra sites: caniuse.rs, cheats.rs, etc.

There are golden sites beside the yet-pages, etc.

Personally, I am in love with caniuse.rs and the cheats.rs has been instrumental whilst learning the ins-and-outs of Rust.

I don't have an idea as to how to integrate them.. So maybe this could be a good place to discuss this.

Offline mode is broken

It’s completely broken in Firefox. I can provide more details if you need, but it should be very, very obvious.

Unable to jump to correct page on offline mode

I fill the "Input the local std doc path" box with file:///home/chirsz/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/ which is my rust doc folder and I can visit it with broswer directly. When I type rs Result in URL bar and select the second option, it go to https://doc.rust-lang.org/stable/std/?search=file%3A%2F%2F%2Fhome%2Fchirsz%2F.rustup%2Ftoolchains%2Fstable-x86_64-unknown-linux-gnu%2Fshare%2Fdoc%2Frust%2Fhtmlstd%2Fresult%2Findex.html instead of file:///home/chirsz/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/htmlstd/result/index.html which I really want.
Is it a bug? Or I did something incorrect?

Path to docs isn’t clever enough

When I run rustup doc --path, I get this output:

C:\Users\me\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\share\doc\rust\html\index.html

But if I enter that verbatim, it gets it very wrong. Looks like what it needs is more like this:

file:///C:/Users/me/.rustup/toolchains/nightly-x86_64-pc-windows-msvc/share/doc/rust/html/

The extension should suggest that I run rustup doc --path (or run it itself, if it can), and figure out the right value from whatever it gives, and just generally be cleverer.

Firefox, Windows.

Where is Firefox AMO?

I want use this addon on Firefox.
However, I do not found this addon on AMO.
Will do you release for Firefox?

When you is busy, I push AMO instead.

Searches should prioritize std over core and alloc

In Firefox, when I type rs cow into the address bar, I get taken to alloc::borrow::Cow, which seems fine, but then if I follow the links from there to core::iter::FromIterator, the implementations for Cow aren't listed. I was confused enough that I almost filed a bug against rustdoc, but then I realized that if I start from std::borrow::Cow, the corresponding link takes me to std::iter::FromIterator, which lists all the implementations as expected.

I think the solution here is to treat core and alloc as special cases and always prefer the docs for the std version of names in those crates.

Do not open changelog tab automatically

First of all, thank you for the extension! It works very nice and neat.

Sometimes, when the extension gets updated, it automatically opens https://rust-search-extension.now.sh/changelog/ in a new tab, immediately changing focus to it. This is annoying, especially when you're preoccupied with other stuff to read.

Would it be possible to add a setting for "automatically open changelog on updates, on/off"?

The browser is Firefox 75.0

Remind me of "rs"

I keep forgetting I have to type rs to activate the extension (please don't laugh), and each time I have to go to the website, realize it's not written anywhere here (and doesn't appear in the featured videos), then go to github and find the information.

So could you please add something like "type rs to activate rust search" prominently on the website and in the sort-of "about box" which appears when I click on the rust icon next to the search bar ?

[Req] lib.rs support

Hi, thank you for this handy addon!

Are there any plans to have the choice to use lib.rs instead of crates.io?

Regards

Cannot set offline std doc path

The 'Options' button is gray, which means I cannot set the offline std doc path
image

Also there is no "Allow file path access" option in settings tab of rust search extension
image

Here is the info of my machine

OS: macOS 10.15.1
Chrome: Version 83.0.4103.61 (Official Build) (64-bit)

Feature flags no longer showing

Hello, the Feature Flags menu in the header is great. I found out very recently that it's a feature of rust-search-extension, and not of docs.rs, when the menu stopped working. All crates show as having no features.

Is there another issue I can track for this? Can you reproduce? Thanks!

Searching external crates is not supported

Hey. I got sent here when I removed the extension again.
The feature I'm looking for is to search e.g. Tokio or futures docs for a certain term. I currently have firefox search bookmarks that allow this, but they just show the search results, and don't jump directly to the item, which is what I hoped this would allow me to do.

The extension doesn't work

The extension doesn't work I search for rust docs in search tab but google results appear. I use Firefox on Ubuntu.

Allow removing `rust` shortcut

I use this extension in Firefox. At the moment the extension uses both rust and rs as shortcuts, but most often when I type rust plus something into the address bar, I want to search in my browser's configured search engine (DuckDuckGo). I have often clicked enter without thinking, and instead of seeing the DuckDuckGo results, I see the search results from my local copy of the Rust documentation, which doesn't include the result I'm looking for. To use DuckDuckGo I have to add ? at the beginning of the query so that the extension doesn't take over.

Could the extension allow choosing whether rust is a shortcut or not? I'd prefer to only have the shortcut rs. (This was my bookmarks shortcut for searching https://doc.rust-lang.org/, before I installed the Rust search extension.)

Support nightly std docs searching

This could be implemented by adding a button to nightly docs page. After adding the search index to extension, we can configure the std searching between stable or nightly.

Alter plugin icon for dark themes

With a dark theme on chrome, the extension logo blends into UI of the search bar. https://imgur.com/4PHOf3c

Request:

Consider adding a white border shadow to the logo or another solution to address plugin logo visibility in black-themed browsers.

Probably low priority since all functionality is implemented through rs in search bar.

OS: Ubuntu x64 19.10

  • OS system theme: Adwaita-dark

Chrome: v80.0.x

Just don't use it

I never remember the details on how to use the plugin. Fall back on old habits

Firefox 离线搜索页面错误

在 firefox 中打开离线搜索,虽然可以在预选框中看到离线搜索结果,但点击后还是从在线文档中打开,离线文档路径变成搜索词。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.