Skip to content

Commit 40e860a

Browse files
committed
Add short description to each known artifact in artifact size table
1 parent 183488e commit 40e860a

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

site/frontend/src/pages/compare/artifact-size/artifact-size-table.vue

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,29 @@ function getClass(a: number | undefined, b: number | undefined): string {
6565
}
6666
return diffClass(b - a);
6767
}
68+
69+
function generateTitle(component: string): string {
70+
if (component === "rustc") {
71+
return `Main binary of the Rust compiler. It is a small shim that links to librustc_driver.so,
72+
which contains most of the compiler logic.`;
73+
} else if (component === "rustdoc") {
74+
return `Tool that generates documentation of Rust crates. Links to librustc_driver.so, which provides
75+
most of the compiler logic.`;
76+
} else if (component === "cargo") {
77+
return "Build tool that compiles crates and their dependencies.";
78+
} else if (component === "librustc_driver") {
79+
return `Shared library which contains the core implementation of the compiler. It is used by several
80+
other tools and binaries.`;
81+
} else if (component === "libLLVM") {
82+
return `LLVM codegen backend that is used by librustc_driver.so to emit optimized assembly.`;
83+
} else if (component === "libstd") {
84+
return `The Rust standard library.`;
85+
} else if (component === "libtest") {
86+
return `Library that contains implementation of the default test harness used by Rust programs.`;
87+
} else {
88+
return ""; // Unknown component
89+
}
90+
}
6891
</script>
6992

7093
<template>
@@ -81,7 +104,9 @@ function getClass(a: number | undefined, b: number | undefined): string {
81104
</thead>
82105
<tbody>
83106
<tr v-for="component in components">
84-
<td class="component">{{ formatName(component) }}</td>
107+
<td class="component" :title="generateTitle(component)">
108+
{{ formatName(component) }}
109+
</td>
85110
<td>
86111
<div class="aligned">
87112
{{ formatValue(a.component_sizes[component]) }}

0 commit comments

Comments
 (0)