15

Rust search extension--在地址栏快速搜索Rust文档、属性和库的浏览器插件

 3 years ago
source link: https://zhuanlan.zhihu.com/p/105169885
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Rust search extension--在地址栏快速搜索Rust文档、属性和库的浏览器插件

https://anyshortcut.com

Rust Search Extension是我从2018年开始开发的浏览器插件,方便大家在浏览器地址栏快速搜索官方文档、内置属性、crates和错误码。目前发布了v0.7版!

目前在Reddit上获得了将近200个赞,欢迎大家下载体验。

Reddit帖子:Announcing rust-search-extension v0.7! Search std docs, crates, error codes, and attributes in your address bar instantly!

主要功能如下:

实时搜索官方文档

  • 目前支持搜索官方文档上std,proc_macro,test三个crate的文档;
  • 支持离线模式搜索本地文档

实时搜索top 10K的crates

输入关键字就能搜索下载量排名前10K的crates(http://crates.io上总共35+K个crate),并且每一个小时会提供最新的crates索引文件。打开插件的popup页面就能自动更新到最新的crates索引。

在关键字前面拼接!(英文叹号)即可只搜索crates。

支持在前面拼接type来只搜索该类型的文档

这些type包括:

  • struct
  • trait
  • static
  • macro
  • const

比如, 输入fn:asref 只搜索函数里面包含asref的结果,或者输入trait:iterator只搜索trait名包括iterator的结果。

搜索内置rust属性

#[derive], #[non_exhaustive]等这些内置属性也能被搜索,但是搜索的结果会和文档或crates混在一起,可以在最前面拼接#(井号)过滤掉其他结果。

搜索Rust官方错误码

全新的官网

https://rust.extension.sh/ 官网上详细列举了各个功能,并配备了GIF图片示例。

Github

rust-search-extension在Github https://github.com/huhu/rust-search-extension开源,欢迎大家提issue或PR!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK