mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-14 15:47:12 +00:00
Release version 1.10.0 (#242)
This commit is contained in:
parent
1fa78df454
commit
1eff07cc0f
11 changed files with 72 additions and 58 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/ennpfpdlaclocpomkiablnmbppdnlhoh.svg)](https://chrome.google.com/webstore/detail/rust-search-extension/ennpfpdlaclocpomkiablnmbppdnlhoh)
|
||||
[![Mozilla Add-on](https://img.shields.io/amo/v/rust-search-extension?color=%2320123A)](https://addons.mozilla.org/firefox/addon/rust-search-extension/)
|
||||
[![Microsoft Edge](https://img.shields.io/badge/microsoft--edge-v1.9.1-1D4F8C)](https://microsoftedge.microsoft.com/addons/detail/olemfibpaicdoooacpfffccidjjagmoe)
|
||||
[![Microsoft Edge](https://img.shields.io/badge/microsoft--edge-v1.10.0-1D4F8C)](https://microsoftedge.microsoft.com/addons/detail/olemfibpaicdoooacpfffccidjjagmoe)
|
||||
[![license-mit](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/huhu/rust-search-extension/blob/master/LICENSE-MIT)
|
||||
[![license-apache](https://img.shields.io/badge/license-Apache-yellow.svg)](https://github.com/huhu/rust-search-extension/blob/master/LICENSE-APACHE)
|
||||
[![Discord](https://img.shields.io/discord/711895914494558250?label=chat&logo=discord)](https://discord.gg/xucZNVd)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/ennpfpdlaclocpomkiablnmbppdnlhoh.svg)](https://chrome.google.com/webstore/detail/rust-search-extension/ennpfpdlaclocpomkiablnmbppdnlhoh)
|
||||
[![Mozilla Add-on](https://img.shields.io/amo/v/rust-search-extension?color=%2320123A)](https://addons.mozilla.org/firefox/addon/rust-search-extension/)
|
||||
[![Microsoft Edge](https://img.shields.io/badge/microsoft--edge-v1.9.1-1D4F8C)](https://microsoftedge.microsoft.com/addons/detail/olemfibpaicdoooacpfffccidjjagmoe)
|
||||
[![Microsoft Edge](https://img.shields.io/badge/microsoft--edge-v1.10.0-1D4F8C)](https://microsoftedge.microsoft.com/addons/detail/olemfibpaicdoooacpfffccidjjagmoe)
|
||||
[![license-mit](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/huhu/rust-search-extension/blob/master/LICENSE-MIT)
|
||||
[![license-apache](https://img.shields.io/badge/license-Apache-yellow.svg)](https://github.com/huhu/rust-search-extension/blob/master/LICENSE-APACHE)
|
||||
[![Discord](https://img.shields.io/discord/711895914494558250?label=chat&logo=discord)](https://discord.gg/xucZNVd)
|
||||
|
|
|
@ -32,18 +32,18 @@ We support search all kinds of Rust docs blaze-fastly. Those docs including:
|
|||
|
||||
## Search nightly docs
|
||||
|
||||
You can prefix a **/** (slash) before the keyword to search nightly docs.
|
||||
You can prefix a **/** (slash) before the keyword to search nightly docs.
|
||||
|
||||
## Search rustc docs
|
||||
|
||||
You can prefix a **//** (double slash) before the keyword to search all of
|
||||
crates [docs of **rustc**](https://doc.rust-lang.org/nightly/nightly-rustc/),
|
||||
such as *rustc_mir*, *rustc_hir*, or *rustc_ast*, etc.
|
||||
You can prefix a **//** (double slash) before the keyword to search all of
|
||||
crates [docs of **rustc**](https://doc.rust-lang.org/nightly/nightly-rustc/),
|
||||
such as _rustc_mir_, _rustc_hir_, or _rustc_ast_, etc.
|
||||
|
||||
> It makes no sense to have a built-in search-index of **rustc** since the **rustc** is changed
|
||||
> very frequently. Therefore, you need to open the **rustc** docs page in advance to sync the
|
||||
> search-index before you search **rustc** docs. However, the search-index of **rustc** is very big,
|
||||
> we never persist it to the local storage (due to the limited storage size available
|
||||
> It makes no sense to have a built-in search-index of **rustc** since the **rustc** is changed
|
||||
> very frequently. Therefore, you need to open the **rustc** docs page in advance to sync the
|
||||
> search-index before you search **rustc** docs. However, the search-index of **rustc** is very big,
|
||||
> we never persist it to the local storage (due to the limited storage size available
|
||||
> to browser extension).
|
||||
|
||||
![IMG](/search-rustc-docs.png)
|
||||
|
@ -51,6 +51,7 @@ such as *rustc_mir*, *rustc_hir*, or *rustc_ast*, etc.
|
|||
## Search with type mode
|
||||
|
||||
You can prefix a type to get the exclusive search result. Those type keywords including:
|
||||
|
||||
- **mod**
|
||||
- **struct**
|
||||
- **enum**
|
||||
|
@ -67,14 +68,14 @@ For example, `fn:asref` to search function or `trait:iterator` to search trait.
|
|||
## Source code mode
|
||||
|
||||
Since **v1.2**, we can straight open the source code page for our docs search result.
|
||||
Simply prefix `src:` (or `s:`, an alias to `src:`) before the keyword, you'll be
|
||||
Simply prefix `src:` (or `s:`, an alias to `src:`) before the keyword, you'll be
|
||||
redirected to the correct source code line of your search result after you press `Enter`.
|
||||
For example, input `src:try_fold` or `s:try_fold`, you'll open the source code line of `std::iter::Iterator::try_fold()`.
|
||||
For example, input `src:try_fold` or `s:try_fold`, you'll open the source code line of `std::iter::Iterator::try_fold()`.
|
||||
|
||||
## Offline mode: search local Rust docs
|
||||
|
||||
You can run command `rustup doc --std` to open the offline std docs.
|
||||
To enable the offline mode, you should check the checkbox and input the offline docs path on the settings page.
|
||||
You can run command `rustup doc --std` to open the offline std docs.
|
||||
To enable the offline mode, you should check the checkbox and input the offline docs path on the settings page.
|
||||
However, please check the [Caveats](/faq/#caveats) if you are a Firefox user.
|
||||
|
||||
![GIF](/offline-mode.gif)
|
||||
|
@ -82,22 +83,22 @@ However, please check the [Caveats](/faq/#caveats) if you are a Firefox user.
|
|||
## Search external crate docs
|
||||
|
||||
After you [add the crate to extension](#add-your-favorite-crate-to-extension), you can prefix **@crate-name** to search
|
||||
the docs exclusive to that crate. For example, input `@tokio spawn` to search docs of **tokio**.
|
||||
the docs exclusive to that crate. For example, input `@tokio spawn` to search docs of **tokio**.
|
||||
|
||||
![GIF](/search-crate-docs.gif)
|
||||
|
||||
**~** is another pretty prefix to search the external crate docs. Unlike the **@** prefix, **~**
|
||||
gives you the power to search docs across all your favorite crates effortlessly.
|
||||
gives you the power to search docs across all your favorite crates effortlessly.
|
||||
|
||||
For example, input `~spawn`, you can get results related to "spawn" from all your favorite crates
|
||||
(e.g. **tokio**, **async_std**, **smol**, and **futures** ).
|
||||
For example, input `~spawn`, you can get results related to "spawn" from all your favorite crates
|
||||
(e.g. **tokio**, **async_std**, **smol**, and **futures** ).
|
||||
|
||||
![IMG](/tide-search.png)
|
||||
|
||||
# Search builtin attributes
|
||||
|
||||
Search builtin attributes (such as `derive`, `non_exhaustive`) are also supported,
|
||||
by default, the result is mixed with other related docs or crates though.
|
||||
Search builtin attributes (such as `derive`, `non_exhaustive`) are also supported,
|
||||
by default, the result is mixed with other related docs or crates though.
|
||||
|
||||
If you prefer to search attribute exclusively, prefix a **#** (pound sign) before the keyword to narrow the result.
|
||||
|
||||
|
@ -105,8 +106,8 @@ If you prefer to search attribute exclusively, prefix a **#** (pound sign) befor
|
|||
|
||||
# Search top 20K crates
|
||||
|
||||
We build top 20K crates index once a day to help you search crates instantly.
|
||||
You can prefix an **!** (exclamation mark) before the keyword to search [docs.rs](https://docs.rs) exclusively,
|
||||
We build top 20K crates index once a day to help you search crates instantly.
|
||||
You can prefix an **!** (exclamation mark) before the keyword to search [docs.rs](https://docs.rs) exclusively,
|
||||
prefix one more **!** (double exclamation marks) to open [crates.io](https://crates.io) page,
|
||||
prefix **!!!** (triple exclamation marks) to open crate's repository (See [Open repository quickly](/#open-repository-quickly)).
|
||||
|
||||
|
@ -118,14 +119,14 @@ prefix **!!!** (triple exclamation marks) to open crate's repository (See [Open
|
|||
|
||||
# Search Rust book chapters
|
||||
|
||||
You can search all of Rust book chapters too! The result will show the title of the related page,
|
||||
You can search all of Rust book chapters too! The result will show the title of the related page,
|
||||
parent chapter, and grandparent chapter. Don't forget the **%** is the prefix to perform the book searching.
|
||||
|
||||
![IMG](/search-book.png)
|
||||
|
||||
# Search Cargo Clippy lints
|
||||
|
||||
**>** (right angle bracket) is also a great prefix to help you search [Cargo Clippy lints](https://rust-lang.github.io/rust-clippy/master/) exclusively.
|
||||
**>** (right angle bracket) is also a great prefix to help you search [Cargo Clippy lints](https://rust-lang.github.io/rust-clippy/master/) exclusively.
|
||||
|
||||
![IMG](/search-clippy-lints.png)
|
||||
|
||||
|
@ -135,26 +136,19 @@ You can search [caniuse.rs](https://caniuse.rs) with **?** prefix.
|
|||
|
||||
![IMG](/search-caniuse.png)
|
||||
|
||||
# Search Rust Version
|
||||
|
||||
Just input any Rust version (such as `1.38` or `v1.38`) to open the release page of that version.
|
||||
|
||||
![](/search-rust-version.png)
|
||||
|
||||
# Commands system
|
||||
|
||||
The command system brings a handy set of useful and convenient commands to you.
|
||||
The command system brings a handy set of useful and convenient commands to you.
|
||||
Each command starts with a **:** (colon), followed by the name, and function differently in individual.
|
||||
Those commands including but not limited to:
|
||||
|
||||
- **:help** - Show the help messages.
|
||||
- **:blog** - Search Rust release blog posts.
|
||||
- **:cargo** - Search useful third-party cargo subcommands.
|
||||
- **:yet** - Search Are We Yet websites.
|
||||
- **:help** - Show the help messages.
|
||||
- **:cargo** - Search useful third-party cargo subcommands.
|
||||
- **:yet** - Search Are We Yet websites.
|
||||
- **:book** - Search Rust books.
|
||||
- **:book/zh** - Search Chinese Rust books.
|
||||
- **:stable** - Show stable Rust scheduled release date.
|
||||
- **:label** - Search issue labels of rust-lang repository.
|
||||
- **:stable** - Show stable Rust scheduled release date.
|
||||
- **:label** - Search issue labels of rust-lang repository.
|
||||
- **:tool** - Show useful rust tools.
|
||||
- **:mirror** - Search Rust mirror websites.
|
||||
- **:stats** - Open search statistics page.
|
||||
|
@ -188,24 +182,22 @@ Docs.rs don't display the crate's feature flags, which is inconvenient. So Rust
|
|||
|
||||
Also, we support optional dependencies.
|
||||
|
||||
## Display Security Advisory
|
||||
|
||||
![](/security-advisory-menu.png)
|
||||
|
||||
## Add your favorite crate to extension
|
||||
|
||||
By clicking the `+ to Rust Search Extension` button, you can add the crate to the extension, which brings the
|
||||
By clicking the `+ to Rust Search Extension` button, you can add the crate to the extension, which brings the
|
||||
search capability for this crate on the address bar.
|
||||
|
||||
## Show Table of Content
|
||||
|
||||
![IMG](/docs-rs-toc.png)
|
||||
|
||||
# Rust repository enhancement
|
||||
|
||||
## Show Table of Content in the release page
|
||||
|
||||
![](/github-release-toc.png)
|
||||
|
||||
# Searching statistics
|
||||
|
||||
Searching statistics page provides a set of useful charts to visualize your search history. This gives you a
|
||||
Searching statistics page provides a set of useful charts to visualize your search history. This gives you a
|
||||
powerful insight view on how frequency you search, how much valuable time you saved.
|
||||
|
||||
These charts including:
|
||||
|
@ -230,11 +222,11 @@ These charts including:
|
|||
|
||||
## Customize crates searching platform
|
||||
|
||||
You can customize your preferred crates searching platform such as [crates.io](https://crates.io)(default)
|
||||
You can customize your preferred crates searching platform such as [crates.io](https://crates.io)(default)
|
||||
or [lib.rs](https://lib.rs) on the settings page.
|
||||
|
||||
## Open repository quickly
|
||||
|
||||
You can prefix **!!!** (triple !) to open crate's repository quickly.
|
||||
For example, input `!!!tokio` then enter, the extension will obtain the repository url then redirect to
|
||||
You can prefix **!!!** (triple !) to open crate's repository quickly.
|
||||
For example, input `!!!tokio` then enter, the extension will obtain the repository url then redirect to
|
||||
the github repository page of **tokio** effortlessly.
|
||||
|
|
|
@ -4,6 +4,26 @@ description = "Changelog"
|
|||
weight = 3
|
||||
+++
|
||||
|
||||
# v1.10.0 -2023-03-25
|
||||
|
||||
- Add security advisory menu to docs.rs ({{ issue(id=239) }})
|
||||
> ![](/security-advisory-menu.png)
|
||||
- Support statistics by year ({{ issue(id=221) }})
|
||||
- Support new error-index page ({{ issue(id=192) }})
|
||||
- Support new search index format since 1.69 ({{ issue(id=233) }})
|
||||
- Bugfix:
|
||||
- Make "add to extension" button vertically centered ({{ issue(id=220) }})
|
||||
- Fix `resourcePath()` null bug. Fix {{ issue(id=219) }}
|
||||
- Fix cargo book command ({{ issue(id=231) }}) ({{ issue(id=234) }})
|
||||
- Fix error code autoincreament bug
|
||||
- Fix can't add crates: Redeclaration of const storage ({{ issue(id=243) }})
|
||||
- Remove:
|
||||
- Remove :blog command ({{ issue(id=240) }})
|
||||
- Remove GitHub release page enhancement ({{ issue(id=241) }})
|
||||
- Remove search rust version feature
|
||||
|
||||
Thanks for the contributions from [@shwin0901](https://github.com/shwin0901), [@duskmoon314](https://github.com/duskmoon314), and [@isunjn](https://github.com/isunjn).
|
||||
|
||||
# v1.9.0 - 2022-11-20
|
||||
|
||||
- Migrate to `chrome.storage.onChange` event to avoid adding docs index failure ({{ issue(id=206) }}).
|
||||
|
|
|
@ -14,21 +14,16 @@ Safari doesn't support omnibox API, which is essential to this extension. See is
|
|||
### Is it possible to customize the number of suggestions shown in address bar?
|
||||
|
||||
The number of suggestions is limited to the browser API, currently we can't customize it. Also, each browser have [a different limit number](https://github.com/huhu/search-extension-core/blob/7629fe7a5f896abf630a2b7dc00e9e6141c36c5c/src/compat.js#L18).
|
||||
|
||||
### Is it possible to modify the plugin keyword trigger? For example, can I trigger with `r + tab` instead of `rs + tab`?
|
||||
|
||||
Unfortunately, the browser's API doesn't allow the extension to change its keyword dynamically. You can customize your keyword by changing [this line](https://github.com/huhu/rust-search-extension/blob/599b1c9a312751e3cfeef02e5f39d393aa091ba3/manifest.jsonnet#L12) to build your own version.
|
||||
# Permissions
|
||||
|
||||
### Why does the extension require access to github.com?
|
||||
|
||||
Since **v1.1.0**, we add a [new enhancement feature](/#rust-repository-enhancement) for the rust-lang repository's [release page](https://github.com/rust-lang/rust/blob/master/RELEASES.md).
|
||||
This needs permission to access the single release page, no other page else. See the extension permission declaration file: [line 38](https://github.com/huhu/rust-search-extension/blob/7a0aabd0eada6c615816c3f164647d3059fa4d6f/manifest.jsonnet#L38).
|
||||
|
||||
# Caveats
|
||||
|
||||
### Why local `file:` rust doc not work properly on Firefox?
|
||||
|
||||
For security reasons, in Firefox, `file:` URLs is an unprivileged URL, accessing to those unprivileged URLs are prohibited.
|
||||
For security reasons, in Firefox, `file:` URLs is an unprivileged URL, accessing to those unprivileged URLs are prohibited.
|
||||
See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create) for more detail.
|
||||
|
||||
### Any workaround to support offline mode on Firefox?
|
||||
|
|
BIN
docs/static/github-release-toc.png
vendored
BIN
docs/static/github-release-toc.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 86 KiB |
BIN
docs/static/search-rust-version.png
vendored
BIN
docs/static/search-rust-version.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 79 KiB |
BIN
docs/static/security-advisory-menu.png
vendored
Normal file
BIN
docs/static/security-advisory-menu.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 234 KiB |
9
docs/templates/index.html
vendored
9
docs/templates/index.html
vendored
|
@ -25,6 +25,7 @@
|
|||
content="{{ config.extra.meta_description }}">
|
||||
<meta name="twitter:image" content="https://rust.extension.sh/banner.png">
|
||||
<link rel="stylesheet" href="{{ get_url(path="index.css") }}">
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
{% endblock head %}
|
||||
|
||||
{% block hero %}
|
||||
|
@ -38,10 +39,16 @@
|
|||
<code>Space</code>
|
||||
to get started. Just that easy!
|
||||
</h3>
|
||||
<div style="text-align: center;">
|
||||
<a class="github-button" href="https://github.com/huhu/rust-search-extension" data-size="large" data-show-count="true"
|
||||
aria-label="Star huhu/rust-search-extension on GitHub">Star</a>
|
||||
<a class="github-button" href="https://github.com/huhu/rust-search-extension/fork" data-size="large"
|
||||
data-show-count="true" aria-label="Fork huhu/rust-search-extension on GitHub">Fork</a>
|
||||
</div>
|
||||
<div style="margin-top: 50px; display: flex; flex-direction: column; align-items: center">
|
||||
<a class="subtitle-text" style="text-decoration: underline; margin: 10px"
|
||||
href="https://github.com/huhu/rust-search-extension/releases">
|
||||
Current version 1.9.1
|
||||
Current version 1.10.0
|
||||
</a>
|
||||
<a class="btn-download chrome"
|
||||
href="https://chrome.google.com/webstore/detail/rust-search-extension/ennpfpdlaclocpomkiablnmbppdnlhoh"
|
||||
|
|
|
@ -133,7 +133,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|||
advisoryMenu.innerHTML = `<a href="https://rustsec.org/${advisories.length > 0 ? `packages/${crateName}.html` : ""}"
|
||||
class="pure-menu-link" target="_blank">
|
||||
<span class="fa-svg" aria-hidden="true">${SVG_SHEILD}</span>
|
||||
<span class="title">Security advisory ${advisories.length}</span>
|
||||
<span class="title">Security ${advisories.length}</span>
|
||||
</a>
|
||||
<div class="pure-menu-children rse-dropdown-content" role="menu">
|
||||
${advisories.length > 0 ? `<ul>${html}</ul>` : `<div style="padding: 1rem;text-align: center;"><img style="width:100px;padding:1rem"src="https://rustsec.org/img/rustsec-logo-square.svg"/> <div>No security advisories found.</div></div>`}
|
||||
|
|
|
@ -8,7 +8,7 @@ local icons() = {
|
|||
};
|
||||
|
||||
local name = 'Rust Search Extension';
|
||||
local version = '1.9.1';
|
||||
local version = '1.10.0';
|
||||
local keyword = 'rs';
|
||||
local description = 'Rust Search Extension - the ultimate search extension for Rust';
|
||||
|
||||
|
|
Loading…
Reference in a new issue