<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustdoc/html/static/js, branch 1.84.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.84.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.84.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-11-18T20:37:53+00:00</updated>
<entry>
<title>rustdoc-search: add descriptive comments to bitmap class</title>
<updated>2024-11-18T20:37:53+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-11-18T20:37:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=826d023561178fdc7bf961beba820fd460b0d89a'/>
<id>urn:sha1:826d023561178fdc7bf961beba820fd460b0d89a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustdoc-search: use smart binary search in bitmaps</title>
<updated>2024-11-18T18:38:25+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-11-18T18:34:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3fbcc1f4b974c407c6e836541a0c5f94467d12c6'/>
<id>urn:sha1:3fbcc1f4b974c407c6e836541a0c5f94467d12c6</id>
<content type='text'>
Addresses a comment from [jsha's benchmarking], where the `contains`
function showed up in the profiler. This commit pulls it from about
5% of the runtime to about 0.5%.

[jsha's benchmarking]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/search.20profiling/near/481868761
</content>
</entry>
<entry>
<title>rustdoc search: allow queries to end in an empty path segment</title>
<updated>2024-11-15T22:32:40+00:00</updated>
<author>
<name>binarycat</name>
<email>binarycat@envs.net</email>
</author>
<published>2024-11-03T19:17:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cd46ff6c052421277a7a3548b4fe40be4973feb1'/>
<id>urn:sha1:cd46ff6c052421277a7a3548b4fe40be4973feb1</id>
<content type='text'>
fixes https://github.com/rust-lang/rust/issues/129707

this can be used to show all items in a module,
or all associated items for a type.
currently sufferes slightly due to case insensitivity,
so `Option::` will also show items in the `option::` module.

it disables the checking of the last path element,
otherwise only items with short names will be shown
</content>
</entry>
<entry>
<title>Auto merge of #133047 - matthiaskrgr:rollup-9se1vth, r=matthiaskrgr</title>
<updated>2024-11-14T21:09:28+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-11-14T21:09:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e84902d35a4d3039c794e139eb12fba3624c5ff1'/>
<id>urn:sha1:e84902d35a4d3039c794e139eb12fba3624c5ff1</id>
<content type='text'>
Rollup of 4 pull requests

Successful merges:

 - #128197 (Skip locking span interner for some syntax context checks)
 - #133040 ([rustdoc] Fix handling of footnote reference in footnote definition)
 - #133043 (rustdoc-search: case-sensitive only when capitals are used)
 - #133046 (Clippy subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
</content>
</entry>
<entry>
<title>rustdoc-search: case-sensitive only when capitals are used</title>
<updated>2024-11-14T18:10:14+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-11-14T18:08:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=32500aa8e0f23029c0fa69235d19f770106c016f'/>
<id>urn:sha1:32500aa8e0f23029c0fa69235d19f770106c016f</id>
<content type='text'>
This is the "smartcase" behavior, described by vim and dtolnay.
</content>
</entry>
<entry>
<title>Add descriptive comment for NameTrie</title>
<updated>2024-11-13T22:26:57+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-11-13T22:26:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e534f47e955d3ab50191acb2fa4874bb4fb1cde6'/>
<id>urn:sha1:e534f47e955d3ab50191acb2fa4874bb4fb1cde6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove console.log</title>
<updated>2024-11-13T21:55:06+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-11-13T21:55:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1d133993eda7434392569f5e5ea8136afe6d5d8c'/>
<id>urn:sha1:1d133993eda7434392569f5e5ea8136afe6d5d8c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustdoc: use a trie for name-based search</title>
<updated>2024-11-13T19:04:46+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-11-13T17:46:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=86da4be47f3a0d52b894535a227ee3f2515b9af3'/>
<id>urn:sha1:86da4be47f3a0d52b894535a227ee3f2515b9af3</id>
<content type='text'>
Preview and profiler results
----------------------------

Here's some quick profiling in Firefox done on the rust compiler docs:

- Before: https://share.firefox.dev/3UPm3M8
- After: https://share.firefox.dev/40LXvYb

Here's the results for the node.js profiler:

- https://notriddle.com/rustdoc-html-demo-15/trie-perf/index.html

Here's a copy that you can use to try it out. Compare it with [the nightly].
Try typing `typecheckercontext` one character at a time, slowly.

- https://notriddle.com/rustdoc-html-demo-15/compiler-doc-trie/index.html

[the nightly]: https://doc.rust-lang.org/nightly/nightly-rustc/

The fuzzy match algo is based on [Fast String Correction with
Levenshtein-Automata] and the corresponding implementation code in [moman]
and [Lucene]; the bit-packing representation comes from Lucene, but the
actual matcher is more based on `fsc.py`. As suggested in the paper, a
trie is used to represent the FSA dictionary.

The same trie is used for prefix matching. Substring matching is done with a
side table of three-character[^1] windows that point into the trie.

[Fast String Correction with Levenshtein-Automata]: https://github.com/tpn/pdfs/blob/master/Fast%20String%20Correction%20with%20Levenshtein-Automata%20(2002)%20(10.1.1.16.652).pdf
[Lucene]: https://fossies.org/linux/lucene/lucene/core/src/java/org/apache/lucene/util/automaton/Lev1TParametricDescription.java
[moman]: https://gitlab.com/notriddle/moman-rustdoc

User-visible changes
--------------------

I don't expect anybody to notice anything, but it does cause two changes:

- Substring matches, in the middle of a name, only apply if there's three
  or more characters in the search query.
- Levenshtein distance limit now maxes out at two. In the old version,
  the limit was w/3, so you could get looser matches for queries with
  9 or more characters[^1] in them.

[^1]: technically utf-16 code units
</content>
</entry>
<entry>
<title>Adjust ranking so that duplicates count against rank</title>
<updated>2024-10-31T20:12:14+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-10-31T20:09:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9900ea48b566656fb12b5fcbd0a1b20aaa96e5ca'/>
<id>urn:sha1:9900ea48b566656fb12b5fcbd0a1b20aaa96e5ca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustdoc-search: simplify rules for generics and type params</title>
<updated>2024-10-30T19:27:48+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-09-25T01:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=12dc24f46007f82b93ed85614347a42d47580afa'/>
<id>urn:sha1:12dc24f46007f82b93ed85614347a42d47580afa</id>
<content type='text'>
This commit is a response to feedback on the displayed type
signatures results, by making generics act stricter.

Generics are tightened by making order significant. This means
`Vec&lt;Allocator&gt;` now matches only with a true vector of allocators,
instead of matching the second type param. It also makes unboxing
within generics stricter, so `Result&lt;A, B&gt;` only matches if `B`
is in the error type and `A` is in the success type. The top level
of the function search is unaffected.

Find the discussion on:

* &lt;https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.202024-07-08/near/449965149&gt;
* &lt;https://github.com/rust-lang/rust/pull/124544#issuecomment-2204272265&gt;
* &lt;https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/deciding.20on.20semantics.20of.20generics.20in.20rustdoc.20search/near/476841363&gt;
</content>
</entry>
</feed>
