This commit is contained in:
nora 2025-07-27 16:40:29 +02:00
commit 2014bd8ee1
5 changed files with 96 additions and 0 deletions

29
build.sh Normal file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euxo pipefail
root=$(realpath "$PWD")
# use a higher depth because bootstrap might be broken with depth 1?
git clone --depth 50 https://github.com/rust-lang/rust.git
cd rust
./configure \
--set llvm.download-ci-llvm=true \
--set rust.download-rustc=true
targets=(x86_64-unknown-linux-gnu x86_64-pc-windows-msvc aarch64-apple-darwin)
for target in "${targets[@]}"; do
echo "Building $target"
export RUSTDOCFLAGS="--document-private-items \
--document-hidden-items \
--html-before-content=$root/before.html \
--extend-css=$root/style.css"
./x doc library --target "$target"
mkdir "$root/www-root/$target"
cp -r "./build/$target/doc" "$root/www-root/$target"
done