From 64813bae186fd8494c327e9804b4a3a6c7a439ac Mon Sep 17 00:00:00 2001 From: Arthur Meyre Date: Thu, 27 Apr 2023 13:09:59 +0200 Subject: [PATCH] chore(tfhe): as seen there are uses of ilog2 which come from rust 1.67 --- Makefile | 2 +- scripts/check_cargo_min_ver.sh | 8 +++++--- tfhe/Cargo.toml | 2 +- tfhe/docs/js_on_wasm_api/tutorial.md | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 264574d9e..12d9c7f4f 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ RS_BUILD_TOOLCHAIN:=$(shell \ ( (echo $(TARGET_ARCH_FEATURE) | grep -q x86) && echo stable) || echo $(RS_CHECK_TOOLCHAIN)) CARGO_RS_BUILD_TOOLCHAIN:=+$(RS_BUILD_TOOLCHAIN) CARGO_PROFILE?=release -MIN_RUST_VERSION:=1.65 +MIN_RUST_VERSION:=$(shell grep rust-version tfhe/Cargo.toml | cut -d '=' -f 2 | xargs) AVX512_SUPPORT?=OFF WASM_RUSTFLAGS:= BIG_TESTS_INSTANCE?=FALSE diff --git a/scripts/check_cargo_min_ver.sh b/scripts/check_cargo_min_ver.sh index 7ece83aa0..8302f23d7 100755 --- a/scripts/check_cargo_min_ver.sh +++ b/scripts/check_cargo_min_ver.sh @@ -2,18 +2,20 @@ set -e +CURR_DIR="$(dirname "$0")" +REL_CARGO_TOML_PATH="${CURR_DIR}/../tfhe/Cargo.toml" +MIN_RUST_VERSION="$(grep rust-version "${REL_CARGO_TOML_PATH}" | cut -d '=' -f 2 | xargs)" + function usage() { echo "$0: check minimum cargo version" echo echo "--help Print this message" echo "--rust-toolchain The toolchain to check the version for with leading" - echo "--min-rust-version Check toolchain version is >= to this version, default is 1.65" + echo "--min-rust-version Check toolchain version is >= to this version, default is ${MIN_RUST_VERSION}" echo } RUST_TOOLCHAIN="" -# We set the default rust version 1.65 which is the minimum version required for stable GATs -MIN_RUST_VERSION="1.65" while [ -n "$1" ] do diff --git a/tfhe/Cargo.toml b/tfhe/Cargo.toml index 247112179..558785709 100644 --- a/tfhe/Cargo.toml +++ b/tfhe/Cargo.toml @@ -11,7 +11,7 @@ license = "BSD-3-Clause-Clear" description = "TFHE-rs is a fully homomorphic encryption (FHE) library that implements Zama's variant of TFHE." build = "build.rs" exclude = ["/docs/", "/c_api_tests/", "/CMakeLists.txt", "/js_on_wasm_tests/"] -rust-version = "1.65" +rust-version = "1.67" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tfhe/docs/js_on_wasm_api/tutorial.md b/tfhe/docs/js_on_wasm_api/tutorial.md index 1859c8f3e..b22a8fec4 100644 --- a/tfhe/docs/js_on_wasm_api/tutorial.md +++ b/tfhe/docs/js_on_wasm_api/tutorial.md @@ -14,7 +14,7 @@ Some parameter sets lead to FHE keys that are too big to fit in the 2GB memory s ### Setting-up TFHE-rs JS on WASM API for use in nodejs programs. -To build the JS on WASM bindings for TFHE-rs, you need to install [`wasm-pack`](https://rustwasm.github.io/wasm-pack/) in addition to a compatible (>= 1.65) [`rust toolchain`](https://rustup.rs/). +To build the JS on WASM bindings for TFHE-rs, you need to install [`wasm-pack`](https://rustwasm.github.io/wasm-pack/) in addition to a compatible (>= 1.67) [`rust toolchain`](https://rustup.rs/). In a shell, then run the following to clone the TFHE-rs repo (one may want to checkout a specific tag, here the default branch is used for the build):