Licensing rustdoc output


The de-facto standard for documentation these days seems to be hosting cargo doc output on GitHub pages by pushing to a gh-pages branch. Besides the actual API documentation, cargo doc output contains resources like jQuery, a stylesheet, and webfonts. Rustdoc produces the following:

  • jQuery, licensed under the MIT license. The jQuery site says “You are free to (…) as long as the copyright header is left intact.” The MIT license says “The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.” The MIT license itself is not included in the output.
  • Generated javascript files without copyright notice.
  • Generated html files without copyright notice.
  • Webfonts for Fira Sans, the latest version of which is licensed under the SIL Open Font License 1.1 according to the LICENSE file in the Fira repository. It allows embedding, bundling and redistribution, provided that the copyright notice and license are included. The license is not included in the output. The webfont metadata includes a copyright statement that differs from the one in the Fira repository by year, and the license field says the font is licensed under the Apache License 2.0. The Apache License 2.0 is not included in the output.
  • Webfonts for Heuristica. Interestingly, its metadata includes a copyright statement that among others mentions that “Utopia” is either a registered trademark or trademark of Adobe Systems Incorporated in the United States and/or other countries. The license metadata field does not contain a license but a copyright notice, though the license url is
  • Webfonts for Source Code Pro. Its metadata contains a copyright statement for Adobe and the license url is, which contains a link to the GitHub organisation. The repository contains the SIL Open Font License 1.1.
  • Webfonts for Source Serif Pro. Same situation as Source Code Pro.
  • A stylesheet copyrighted by the Rust Project Developers, dual Apache 2.0 / MIT licensed.
  • Normalize.css which sports the string “MIT License” somewhere.
  • Several javascipt files copyrighted by the Rust Project Developers, dual Apache 2.0 / MIT licensed.

How does this affect hosting documentation on GitHub pages? In particular, what is the effect of having a gh-pages branch in your repository with all of the above output?

Canonical answer for political correctness:

  • Consult a lawyer.

It appears to me that by default, the full texts of the MIT License, the Apache License 2.0, and the SIL Open Font License 1.1 are missing.


Thanks for looking into this! Your analysis sounds reasonable to me.

Perhaps rustdoc should generate a boilerplate license statement and link it from somewhere discoverable.

We need to be sure to differentiate between the license for the code and the content, since the content could be under arbitrary license. Though Cargo does often know this and might be able
to pass it to rustdoc.

As to your questions, IANAL!