The index

Every file this repository tracks, meaning the Rust source and its doc comments, the documentation, this website, the tests, the build and the licence texts split into sections and indexed. Results link to the exact line on GitHub or the exact section on this site.

Loading the index…

Without JavaScript, and why it is a real answer

The complete static index carries the same entries as this page, rendered as ordinary HTML: every file, grouped by kind, with each file's sections and the opening text of each one. It is the same index, not a summary of it, because both come out of tools/search-index/generate.py in the same pass, which is what stops them drifting apart.

A search box that quietly does nothing without JavaScript is the kind of silent degradation this project audits itself against, so it is worth being plain about the trade: the static page cannot rank or filter, and it is a large page because the whole corpus is in it. What it can do is find things, with no code running at all.

What is actually indexed

Worth stating precisely rather than rounding up to "everything", because a search box that quietly does not look at most of the corpus answers "no results" with exactly the same confidence as one that does.

Where a section is longer than one result can show, it is split into several sections rather than cut short, because the limit is on how much a result displays, not on how much is searched.

How the ranking works

Deliberately simple enough to describe in a sentence, because a search that cannot be explained cannot be checked. Every term you type has to appear somewhere in a section for it to be a result at all, so there are no partial matches that quietly rank low. Beyond that, a match in a heading counts for more than one in the body, a match in the file's own name counts for more than one in a directory along its path, and documentation gets a small nudge above tests. Ties break on path and line, so the list does not reshuffle itself between keystrokes.

The index is committed to the repository and regenerated in CI, which compares the result byte for byte. An index that has drifted away from the tree fails the build rather than shipping and answering questions about code that no longer looks like that.