From ec3f3a1b52fe1bc784ee12951e48d05293184ab5 Mon Sep 17 00:00:00 2001 From: Arthur Meyre Date: Mon, 24 Feb 2025 11:09:47 +0100 Subject: [PATCH] chore(docs): use tilde requirements to minimize breakage on users' end --- tfhe/docs/configuration/run_on_gpu.md | 2 +- tfhe/docs/fhe-computation/data-handling/data_versioning.md | 4 ++-- tfhe/docs/fhe-computation/data-handling/serialization.md | 2 +- tfhe/docs/fhe-computation/types/array.md | 2 +- tfhe/docs/fhe-computation/types/strings.md | 2 +- tfhe/docs/getting_started/installation.md | 4 ++-- tfhe/docs/getting_started/quick_start.md | 4 ++-- tfhe/docs/references/core-crypto-api/tutorial.md | 2 +- tfhe/docs/tutorials/ascii_fhe_string.md | 4 ++-- tfhe/docs/tutorials/parity_bit.md | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tfhe/docs/configuration/run_on_gpu.md b/tfhe/docs/configuration/run_on_gpu.md index bfab3c2ea8..fba2288127 100644 --- a/tfhe/docs/configuration/run_on_gpu.md +++ b/tfhe/docs/configuration/run_on_gpu.md @@ -18,7 +18,7 @@ This guide explains how to update your existing program to leverage GPU accelera To use the **TFHE-rs** GPU backend in your project, add the following dependency in your `Cargo.toml`. ```toml -tfhe = { version = "1.0.0", features = ["boolean", "shortint", "integer", "gpu"] } +tfhe = { version = "~1.0.0", features = ["boolean", "shortint", "integer", "gpu"] } ``` {% hint style="success" %} diff --git a/tfhe/docs/fhe-computation/data-handling/data_versioning.md b/tfhe/docs/fhe-computation/data-handling/data_versioning.md index 6bb102cbbb..7cf1e1f81f 100644 --- a/tfhe/docs/fhe-computation/data-handling/data_versioning.md +++ b/tfhe/docs/fhe-computation/data-handling/data_versioning.md @@ -16,8 +16,8 @@ You can load serialized data with the `unversionize` function, even in newer ver [dependencies] # ... -tfhe = { version = "1.0.0", features = ["integer"] } -tfhe-versionable = "0.4.0" +tfhe = { version = "~1.0.0", features = ["integer"] } +tfhe-versionable = "0.5.0" bincode = "1.3.3" ``` diff --git a/tfhe/docs/fhe-computation/data-handling/serialization.md b/tfhe/docs/fhe-computation/data-handling/serialization.md index be2ba69f5a..573c153bc0 100644 --- a/tfhe/docs/fhe-computation/data-handling/serialization.md +++ b/tfhe/docs/fhe-computation/data-handling/serialization.md @@ -161,7 +161,7 @@ In the following example, we use [bincode](https://crates.io/crates/bincode) for [dependencies] # ... -tfhe = { version = "1.0.0", features = ["integer"] } +tfhe = { version = "~1.0.0", features = ["integer"] } bincode = "1.3.3" ``` diff --git a/tfhe/docs/fhe-computation/types/array.md b/tfhe/docs/fhe-computation/types/array.md index 63a41d0a31..3f99d6a952 100644 --- a/tfhe/docs/fhe-computation/types/array.md +++ b/tfhe/docs/fhe-computation/types/array.md @@ -19,7 +19,7 @@ The following example shows a complete workflow of working with encrypted arrays # Cargo.toml [dependencies] -tfhe = { version = "1.0.0", features = ["integer"] } +tfhe = { version = "~1.0.0", features = ["integer"] } ``` ```rust diff --git a/tfhe/docs/fhe-computation/types/strings.md b/tfhe/docs/fhe-computation/types/strings.md index 72af647158..64f319dd10 100644 --- a/tfhe/docs/fhe-computation/types/strings.md +++ b/tfhe/docs/fhe-computation/types/strings.md @@ -29,7 +29,7 @@ Here is an example: # Cargo.toml [dependencies] -tfhe = { version = "1.0.0", features = ["integer", "strings"] } +tfhe = { version = "~1.0.0", features = ["integer", "strings"] } ``` ```rust diff --git a/tfhe/docs/getting_started/installation.md b/tfhe/docs/getting_started/installation.md index 4225b5f192..64d1dce9ea 100644 --- a/tfhe/docs/getting_started/installation.md +++ b/tfhe/docs/getting_started/installation.md @@ -7,7 +7,7 @@ This document provides instructions to set up **TFHE-rs** in your project. First, add **TFHE-rs** as a dependency in your `Cargo.toml`. ```toml -tfhe = { version = "1.0.0", features = ["boolean", "shortint", "integer"] } +tfhe = { version = "~1.0.0", features = ["boolean", "shortint", "integer"] } ``` {% hint style="info" %} @@ -35,5 +35,5 @@ By default, **TFHE-rs** makes the assumption that hardware AES features are enab To add support for older CPU, import **TFHE-rs** with the `software-prng` feature in your `Cargo.toml`: ```toml -tfhe = { version = "1.0.0", features = ["boolean", "shortint", "integer", "software-prng"] } +tfhe = { version = "~1.0.0", features = ["boolean", "shortint", "integer", "software-prng"] } ``` diff --git a/tfhe/docs/getting_started/quick_start.md b/tfhe/docs/getting_started/quick_start.md index 43aa3d0015..e05c9f020e 100644 --- a/tfhe/docs/getting_started/quick_start.md +++ b/tfhe/docs/getting_started/quick_start.md @@ -59,7 +59,7 @@ edition = "2021" Then add the following configuration to include **TFHE-rs**: ```toml -tfhe = { version = "1.0.0", features = ["integer"] } +tfhe = { version = "~1.0.0", features = ["integer"] } ``` Your updated `Cargo.toml` file should look like this: @@ -71,7 +71,7 @@ version = "0.1.0" edition = "2021" [dependencies] -tfhe = { version = "1.0.0", features = ["integer"] } +tfhe = { version = "~1.0.0", features = ["integer"] } ``` If you are on a different platform please refer to the [installation documentation](installation.md) for configuration options of other supported platforms. diff --git a/tfhe/docs/references/core-crypto-api/tutorial.md b/tfhe/docs/references/core-crypto-api/tutorial.md index b079365e81..fe528205d7 100644 --- a/tfhe/docs/references/core-crypto-api/tutorial.md +++ b/tfhe/docs/references/core-crypto-api/tutorial.md @@ -9,7 +9,7 @@ Welcome to this tutorial about `TFHE-rs` `core_crypto` module. To use `TFHE-rs`, it first has to be added as a dependency in the `Cargo.toml`: ```toml -tfhe = { version = "1.0.0" } +tfhe = { version = "~1.0.0" } ``` ### Commented code to double a 2-bit message in a leveled fashion and using a PBS with the `core_crypto` module. diff --git a/tfhe/docs/tutorials/ascii_fhe_string.md b/tfhe/docs/tutorials/ascii_fhe_string.md index d9b8ce9bb3..8b9f16c639 100644 --- a/tfhe/docs/tutorials/ascii_fhe_string.md +++ b/tfhe/docs/tutorials/ascii_fhe_string.md @@ -28,7 +28,7 @@ To use the `FheUint8` type, enable the `integer` feature: # Cargo.toml [dependencies] -tfhe = { version = "1.0.0", features = ["integer"] } +tfhe = { version = "~1.0.0", features = ["integer"] } ``` The `MyFheString::encrypt` function performs data validation to ensure the input string contains only ASCII characters. @@ -167,7 +167,7 @@ First, add the feature in your `Cargo.toml` # Cargo.toml [dependencies] -tfhe = { version = "1.0.0", features = ["strings"] } +tfhe = { version = "~1.0.0", features = ["strings"] } ``` The `FheAsciiString` type allows to simply do homomorphic case changing of encrypted strings (and much more!): diff --git a/tfhe/docs/tutorials/parity_bit.md b/tfhe/docs/tutorials/parity_bit.md index 12dc5c2584..17485e3a38 100644 --- a/tfhe/docs/tutorials/parity_bit.md +++ b/tfhe/docs/tutorials/parity_bit.md @@ -17,7 +17,7 @@ This function returns a Boolean (`true` or `false`) so that the total count of ` ```toml # Cargo.toml -tfhe = { version = "1.0.0", features = ["integer"] } +tfhe = { version = "~1.0.0", features = ["integer"] } ``` First, define the verification function.