rust/src/librustdoc/html/static/js
2023-10-11 12:15:33 -07:00
..
externs.js rustdoc: bug fix for -> option<t> 2023-09-03 13:06:07 -07:00
main.js rustdoc: fix resize trouble with mobile 2023-10-11 12:15:33 -07: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 Rollup merge of #109422 - notriddle:notriddle/impl-disambiguate-search, r=GuillaumeGomez 2023-10-10 18:44:43 +02:00
settings.js rustdoc: allow resizing the sidebar 2023-10-11 10:26:36 -07:00
src-script.js rustdoc: clean up main.js and src-script.js 2023-10-11 10:26:38 -07:00
storage.js rustdoc: enforce BODY_MIN constraint on sidebar resize 2023-10-11 10:26:38 -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