Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rust to 1.69.0 #595

Merged
merged 5 commits into from
Oct 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add update-rust-hashes.sh script
the cross-compilation process in the rust komodo recipe
differs slightly from the current native_rust recipe used
in Zcash. therefore, we have commented out all invocations
of the "update_stdlib_hash" function until the komodo rust
recipe is updated.
DeckerSU committed Oct 24, 2023
commit 2b28926587b9996c5e159c02897e99a9fa1317b9
38 changes: 38 additions & 0 deletions contrib/devtools/update-rust-hashes.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please provide a comment on the purpose and usage of this script

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

export LC_ALL=C

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
RUST_PACKAGE="$SCRIPT_DIR/../../depends/packages/rust.mk"

RUST_VERSION=$( grep -oP "_version=\K.*" $RUST_PACKAGE )

update_hash() {
url="https://static.rust-lang.org/dist/$1-$RUST_VERSION-$2.tar.gz"
echo "Fetching $url"
hash=$( curl $url | sha256sum | awk '{print $1}' )
sed -i "/\$(package)_$3_$4=/c\\\$(package)_$3_$4=$hash" $RUST_PACKAGE
}

update_rust_hash() {
update_hash rust $1 sha256_hash $2
}

update_stdlib_hash() {
update_hash rust-std $1 rust_std_sha256_hash $1
}

# For native targets
# update_rust_hash RUST_TARGET MAKEFILE_PACKAGE_IDENTIFIER
update_rust_hash aarch64-unknown-linux-gnu aarch64_linux
update_rust_hash x86_64-apple-darwin darwin
update_rust_hash x86_64-unknown-linux-gnu linux
update_rust_hash x86_64-unknown-freebsd freebsd
update_rust_hash x86_64-pc-windows-gnu mingw32

# For cross-compilation targets
# update_stdlib_hash RUST_TARGET
# update_stdlib_hash aarch64-unknown-linux-gnu
# update_stdlib_hash x86_64-apple-darwin
# update_stdlib_hash x86_64-pc-windows-gnu
# update_stdlib_hash x86_64-unknown-freebsd