rust/src/librustdoc/html/static/js
2023-12-10 20:53:53 -07:00
..
externs.js rustdoc-search: add support for associated types 2023-11-19 18:54:36 -07:00
main.js Rollup merge of #118325 - clubby789:rustdoc-search-link, r=fmease 2023-11-27 08:21:19 +01:00
README.md Add some JSDoc comments to rustdoc JS 2021-12-22 14:20:04 -08:00
scrape-examples.js Improve calculation of scraped example minimized height 2022-12-07 10:42:09 -08:00
search.js rustdoc-search: fix fast path unboxing bindings 2023-12-10 20:53:53 -07:00
settings.js rustdoc: replace elemIsInParent with Node.contains 2023-11-25 12:33:04 -07:00
src-script.js rustdoc: rename to src-script.js 2023-07-14 16:54:14 -07:00
storage.js rustdoc: remove unused parameter reversed from onEach(Lazy) 2023-12-07 13:02:50 -07:00

Rustdoc JS

These JavaScript files are incorporated into the rustdoc binary at build time, and are minified and written to the filesystem as part of the doc build process.

We use the Closure Compiler dialect of JSDoc to comment our code and annotate params and return types. To run a check:

./x.py doc library/std
npm i -g google-closure-compiler
google-closure-compiler -W VERBOSE \
  build/<YOUR PLATFORM>/doc/{search-index*.js,crates*.js} \
  src/librustdoc/html/static/js/{search.js,main.js,storage.js} \
  --externs src/librustdoc/html/static/js/externs.js >/dev/null