Our great sponsors
- Onboard AI - Learn any GitHub repo in 59 seconds
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- SaaSHub - Software Alternatives and Reviews
-
-
-
Onboard AI
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
-
I think that using an external API won't be allowed by the rustdoc maintainers, and I also think that it's not an optimal solution (it would not work in offline/local mode anyway). There have been previous attempts to provide some very basic "hoogle-like" search (https://github.com/rust-lang/rust/pull/23289). It basically serialized Rust items (functions, structs etc.) in a specific way to make it amenable for such fuzzy search and the implemented the search in JavaScript. That is probably the "safest" option how to implement this.
-
I tried gzip'ing suggested in the article and the index for std crate is now 6.5 MB, which is bearable given the existing search index for the crate on docs.rs is 4.8 MB.