rust/src/librustdoc/html/static/js
2023-09-13 13:59:43 +02:00
..
externs.js rustdoc-search: build args, return, and generics on one unifier 2023-06-11 18:19:37 -07:00
main.js Merge settings.css into rustdoc.css 2023-09-13 13:59:43 +02: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 #115490 - pitaj:rustdoc-searchjs-comment, r=GuillaumeGomez 2023-09-03 15:42:12 +02:00
settings.js Change syntax for anonymous functions set 2023-09-08 12:08:42 +02:00
src-script.js rustdoc: rename to src-script.js 2023-07-14 16:54:14 -07:00
storage.js rustdoc: use src consistently over source in code 2023-07-14 16:38:01 -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