rust/src
Matthias Krüger 9371122459
Rollup merge of #140815 - yaahc:rustdoc-metrics, r=GuillaumeGomez
also export metrics from librustdoc

Addresses the issue mentioned here: [#t-docs-rs > metrics intitiative @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/356853-t-docs-rs/topic/metrics.20intitiative/near/515714331)

The previous implementation only emitted metrics from rustc, but it turns out running `cargo doc` only calls `rustc` for dependencies, and not for the root crate being documented. We are planning to gather a sample dataset from docs.rs ci via `cargo doc` so as things stood this would not emit any metrics for any of the crates themselves that were published.

This change adds the same logic from `rustc_driver_impl` to `librustdoc` to also dump metrics at the end of its execution if they are enabled.

Note: The hash's generated by librustdoc will likely be completely different from the ones generated by rustc. This is because rustc is actually doing the various passes needed to fully calculate the stable version hash. My understanding of how rustdoc works is that the hashes generated will be working with partial information due to it only doing the work required to generate docs. The hashes will still be unique per crate and will work for the purposes of the metrics proof of concept, it would not be possible to correlate metrics generated by rustdoc with those generated by rustc for the same crate. This is fine for the purposes of the PoC but a future full implementation of metrics may want to address this issue.
2025-05-09 21:50:06 +02:00
..
bootstrap bootstrap: more consistent use of ... when citing configuration snippets 2025-05-08 20:14:10 +02:00
build_helper Remove git_repository field from GitConfig 2025-04-23 10:41:20 +02:00
ci Rollup merge of #140135 - GuillaumeGomez:sidebars-image, r=rustdoc 2025-05-06 14:50:45 +02:00
doc Auto merge of #140786 - Kobzol:try-builds-no-deny-warnings, r=jieyouxu 2025-05-08 18:21:54 +00:00
etc Rollup merge of #139843 - thaliaarchi:editor-file-associations, r=Mark-Simulacrum 2025-04-19 19:30:47 +00:00
gcc@0ea98a1365 Update gcc submodule to 0ea98a1365b81f7488073512c850e8ee951a4afd 2025-04-25 09:27:10 +02:00
librustdoc Rollup merge of #140815 - yaahc:rustdoc-metrics, r=GuillaumeGomez 2025-05-09 21:50:06 +02:00
llvm-project@8448283b4b Update to LLVM 20.1.4 2025-04-30 09:14:12 +02:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types Update rustdoc-json-types FORMAT_VERSION to 45 2025-04-18 20:34:56 +02:00
tools Rollup merge of #140804 - bend-n:signed, r=lcnr 2025-05-09 16:25:04 +10:00
README.md
stage0 Remove git_repository from the stage0 file 2025-04-23 10:41:20 +02:00
version bump version number to 1.89.0 2025-05-09 11:13:08 +02:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.