This commit is contained in:
nora 2025-07-28 19:53:08 +02:00
parent 1e8053fb18
commit 16775aa040
3 changed files with 17 additions and 5 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/doc /doc
/rust /rust
/www-root /www-root
/html-test.rs

View file

@ -1,6 +1,16 @@
<script type="module"> <script type="module">
const selectedTarget =
window.location.pathname.split("/")[1] ?? "x86_64-unknown-linux-gnu";
const info = document.createElement("div"); const info = document.createElement("div");
info.classList.add("_internal-info"); info.classList.add("_internal-info");
const targets = [
{ value: "x86_64-unknown-linux-gnu", name: "x86-64 GNU/Linux" },
{ value: "x86_64-pc-windows-msvc", name: "x86-64 Windows MSVC" },
{ value: "aarch64-apple-darwin", name: "ARM64 MacOS" },
];
info.innerHTML = ` info.innerHTML = `
<div>⚠ Internal Docs ⚠</div> <div>⚠ Internal Docs ⚠</div>
<div>This website was built by <a href="https://github.com/Noratrieb/std-internal-docs">Noratrieb</a></div> <div>This website was built by <a href="https://github.com/Noratrieb/std-internal-docs">Noratrieb</a></div>
@ -13,9 +23,7 @@
</div> </div>
<div> <div>
<select id="target-select"> <select id="target-select">
<option value="x86_64-unknown-linux-gnu">x86-64 GNU/Linux</option> ${targets.map((target) => `<option value="${target.value}"${selectedTarget === target.value ? " selected" : ""}>${target.name}</option>`)}
<option value="x86_64-pc-windows-msvc">x86-64 Windows MSVC</option>
<option value="aarch64-apple-darwin">ARM64 MacOS</option>
</select> </select>
</div> </div>
</div> </div>
@ -26,6 +34,6 @@
document.getElementById("target-select").addEventListener("change", (e) => { document.getElementById("target-select").addEventListener("change", (e) => {
// not very clever, just change the target at all. // not very clever, just change the target at all.
// we could try to substitute the path or something better. // we could try to substitute the path or something better.
window.location.pathname = `${e.target.value}/std`; window.location.pathname = `/${e.target.value}/std`;
}); });
</script> </script>

View file

@ -7,9 +7,12 @@ root=$(realpath "$PWD")
cp index.html "$root/www-root" cp index.html "$root/www-root"
# use a higher depth because bootstrap might be broken with depth 1? # use a higher depth because bootstrap might be broken with depth 1?
git clone --depth 50 https://github.com/rust-lang/rust.git if [ ! -d 'rust' ]; then
git clone --depth 50 https://github.com/rust-lang/rust.git
fi
cd rust cd rust
rm -f bootstrap.toml
./configure \ ./configure \
--set llvm.download-ci-llvm=true \ --set llvm.download-ci-llvm=true \
--set rust.llvm-tools=false \ --set rust.llvm-tools=false \