tree: 416f34ec7490b454a24a8e114116f33ec213b92a [path history] [tgz]
  1. externs.js
  2. main.js
  3. README.md
  4. scrape-examples.js
  5. search.js
  6. settings.js
  7. src-script.js
  8. storage.js
src/librustdoc/html/static/js/README.md

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