[source] git = "https://gitlab.redox-os.org/redox-os/rust.git" branch = "redox-2025-10-03" # due to heavy git operation, this will only clone once and will not refetch # if you want to refetch or changing the branch, please run `make ucr.rust` shallow_clone = true [build] template = "custom" dependencies = [ "llvm21", "zlib" ] script = """ DYNAMIC_INIT # Linker flags for stage2 compiler (host -> target) export LDFLAGS_x86_64_unknown_redox="${LDFLAGS}" # LLVM export CARGO_TARGET_X86_64_UNKNOWN_REDOX_RUSTFLAGS="\ -Clink-args=-L${COOKBOOK_SYSROOT}/lib \ -Clink-args=-Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib \ -Clink-args=-lz" # Don't poison the stage1 compiler (host -> host) unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF RUSTFLAGS STRIP python3 "${COOKBOOK_SOURCE}/x.py" install \ --config "${COOKBOOK_RECIPE}/config.toml" \ --jobs $(nproc) mkdir -p "${COOKBOOK_STAGE}"/usr rsync -av --delete "${COOKBOOK_BUILD}"/install/* "${COOKBOOK_STAGE}"/usr/ # TODO: rustdoc """ [package] dependencies = [ "cargo" ] # TODO: Not implemented # version_script = """ # printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" # """