feat: support create on-demand search#311
Closed
bxb100 wants to merge 1 commit into
Closed
Conversation
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Author
|
The docs.rs load function getVar(name) {
const el = document.querySelector("head > meta[name='rustdoc-vars']");
const v = el ? el.getAttribute("data-" + name) : null;
if (v !== null) {
return v;
}
throw `rustdoc var "${name}" is missing`;
}Current code does not deal with this compatibility problem, but I don't think assembling all index js files into a flat JSON to cache is a good idea |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since rust-lang/rust#144476 started using stringdex for on-demand search,
this extension's original search-index.js is not working anymore. So, I think maybe using on-demand search with the extension sandbox is a good idea, because the separte index script is small and can be cached by the browser, and naturally, the query is a single activity (it only supports
@crate query), so the speed is not a problem.Currently implementing only tests in Chrome.
Important
This code was generated by Codex; it is just an experimental test, not for merge.