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

Cmake options default on #583

Merged
merged 17 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Run C++ curve Tests
working-directory: ./icicle_v3/build/tests
if: needs.check-changed-files.outputs.cpp_cuda == 'true'
run: ctest --verbose
run: ctest

test-linux-field:
name: Test on Linux
Expand Down Expand Up @@ -123,4 +123,4 @@ jobs:
- name: Run C++ field Tests
working-directory: ./icicle_v3/build/tests
if: needs.check-changed-files.outputs.cpp_cuda == 'true'
run: ctest --verbose
run: ctest
8 changes: 4 additions & 4 deletions .github/workflows/v3_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true'
# tests are split to phases since NTT domain is global but tests have conflicting requirements
run: |
cargo build --release --verbose --features=g2,ec_ntt
cargo test --workspace --release --verbose --features=g2,ec_ntt,cuda_backend -- --skip phase
cargo test phase2 --workspace --release --verbose --features=g2,ec_ntt,cuda_backend
cargo test phase3 --workspace --release --verbose --features=g2,ec_ntt,cuda_backend
cargo build --workspace --release --features=cuda_backend
cargo test --workspace --release --verbose --features=cuda_backend -- --skip phase
cargo test phase2 --workspace --release --features=cuda_backend
cargo test phase3 --workspace --release --features=cuda_backend
141 changes: 91 additions & 50 deletions docs/docs/icicle/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ ICICLE can be built and tested in C++ using CMake. The build process is straight
```

2. **Configure the build:**
```bash
```bash
mkdir -p build && rm -rf build/*
cmake -S icicle -B build -DFIELD=babybear
```

:::note
To specify the field, use the flag -DFIELD=field, where field can be one of the following: babybear, stark252, m31.
To specify a curve, use the flag -DCURVE=curve, where curve can be one of the following: bn254, bls12_377, bls12_381, bw6_761, grumpkin.
:::info
To specify the field, use the flag -DFIELD=field, where field can be one of the following: babybear, stark252, m31.

To specify a curve, use the flag -DCURVE=curve, where curve can be one of the following: bn254, bls12_377, bls12_381, bw6_761, grumpkin.
:::

:::tip
If you have access to cuda backend repo, it can be built along ICICLE frontend by adding the following to the cmake command
- `-DCUDA_BACKEND=local` # if you have it locally
- `-DCUDA_BACKEND=<commit|branch>` # to pull CUDA backend, given you have access
:::

3. **Build the project:**
Expand All @@ -35,39 +42,39 @@ ICICLE can be built and tested in C++ using CMake. The build process is straight
This is building the [libicicle_device](./libraries.md#icicle-device) and the [libicicle_field_babybear](./libraries.md#icicle-core) frontend lib that correspond to the field or curve.

4. **Link:**
Link you application (or library) to ICICLE:
```cmake
target_link_libraries(yourApp PRIVATE icicle_field_babybear icicle_device)
```
Link you application (or library) to ICICLE:
```cmake
target_link_libraries(yourApp PRIVATE icicle_field_babybear icicle_device)
```

5. **Installation (optional):**
To install the libs, specify the install prefix in the [cmake command](./getting_started.md#build-commands)
`-DCMAKE_INSTALL_PREFIX=/install/dir/`. Default install path on linux is `/usr/local` if not specified. For other systems it may differ. The cmake command will print it to the log
```
-- CMAKE_INSTALL_PREFIX=/install/dir/for/cmake/install
```
Then after building, use cmake to install the libraries:
```
cmake -S icicle -B build -DFIELD=babybear -DCMAKE_INSTALL_PREFIX=/path/to/install/dir/
cmake --build build -j # build
cmake --install build # install icicle to /path/to/install/dir/
```
To install the libs, specify the install prefix in the [cmake command](./getting_started.md#build-commands)
`-DCMAKE_INSTALL_PREFIX=/install/dir/`. Default install path on linux is `/usr/local` if not specified. For other systems it may differ. The cmake command will print it to the log
```
-- CMAKE_INSTALL_PREFIX=/install/dir/for/cmake/install
```
Then after building, use cmake to install the libraries:
```
cmake -S icicle -B build -DFIELD=babybear -DCMAKE_INSTALL_PREFIX=/path/to/install/dir/
cmake --build build -j # build
cmake --install build # install icicle to /path/to/install/dir/
```

6. **Run tests (optional):**
Add `-DBUILD_TESTS=ON` to the [cmake command](./getting_started.md#build-commands) and build.
Execute all tests
```bash
cmake -S icicle -B build -DFIELD=babybear -DBUILD_TESTS=ON
cmake --build build -j
cd build/tests
ctest
```
or choose the test-suite
```bash
./build/tests/test_field_api # or another test suite
# can specify tests using regex. For example for tests with ntt in the name:
./build/tests/test_field_api --gtest_filter="*ntt*"
```
Add `-DBUILD_TESTS=ON` to the [cmake command](./getting_started.md#build-commands) and build.
Execute all tests
```bash
cmake -S icicle -B build -DFIELD=babybear -DBUILD_TESTS=ON
cmake --build build -j
cd build/tests
ctest
```
or choose the test-suite
```bash
./build/tests/test_field_api # or another test suite
# can specify tests using regex. For example for tests with ntt in the name:
./build/tests/test_field_api --gtest_filter="*ntt*"
```
:::note
Most tests assume a cuda backend exists and will fail otherwise if cannot find a CUDA device.
:::
Expand All @@ -81,30 +88,61 @@ You can customize your ICICLE build with the following flags:
- `-DBUILD_TESTS=ON/OFF`: Enable or disable tests. `default=OFF`.
- `-DBUILD_BENCHMARKS=ON/OFF`: Enable or disable benchmarks. `default=OFF`.

#### Features

By default, all [features](./libraries.md#supported-curves-and-operations) are enabled.
This is since installed backends may implement and register all APIs. Missing APIs in the frontend would cause linkage to fail due to missing symbols. Therefore by default we include them in the frontend part too.

To disable features, add the following to the cmake command.
- ntt: `-DNTT=OFF`
- msm: `-DMSM=OFF`
- g2 msm: `-DG2=OFF`
- ecntt: `-DECNTT=OFF`
- extension field: `-DEXT_FIELD=OFF`

:::tip
Disabling features is useful when developing with a backend that is slow to compile (e.g. CUDA backend);
:::

### Rust: Build, Test, and Install

To build and test ICICLE in Rust, follow these steps:

1. **Navigate to the Rust bindings directory:**
```bash
cd wrappers/rust # or go to a specific field/curve 'cd wrappers/rust/icicle-fields/icicle-babybear'
```
```bash
cd wrappers/rust # or go to a specific field/curve 'cd wrappers/rust/icicle-fields/icicle-babybear'
```

2. **Build the Rust project:**
TODO what about features? Now it doesn't make sense to disable features.
```bash
cargo build --release
```
```bash
cargo build --release
```
By default, all [supported features are enabled](#features).
Cargo features are used to disable features, rather than enable them, for the reason explained [here](#features):
- `no_g2` to disable G2 MSM
- `no_ecntt` to disable ECNTT

They can be disabled as follows:
```bash
cargo build --release --no-default-features --features=no_ecntt,no_g2
```

4. **Run tests:**
```bash
cargo test
```
:::note
If you have access to cuda backend repo, it can be built along ICICLE frontend by using the following cargo features:
- `cuda_backend` : if the cuda backend resides in `icicle/backend/cuda`
- `pull_cuda_backend` : to pull main branch and build it
:::


3. **Run tests:**
```bash
cargo test # optional: --features=no_ecntt,no_g2,cuda_backend
```
:::note
Most tests assume a CUDA backend is installed and fail otherwise.
:::

5. **Install the library:**
4. **Install the library:**

By default, the libraries are installed to the `target/<buildmode>/deps/icicle` dir. For custom install dir. define the env variable:
```bash
Expand All @@ -114,7 +152,6 @@ export ICICLE_INSTALL_DIR=/path/to/install/dir
(TODO: cargo install ?)

#### Use as cargo dependency

In cargo.toml, specify the ICICLE libs to use:

```bash
Expand All @@ -125,13 +162,17 @@ icicle-bls12-377 = { path = "git = "https://github.com/ingonyama-zk/icicle.git"
# add other ICICLE crates here if need additional fields/curves
```

:::note
Can specify `branch = <branch-name>` or `tag = <tag-name>` or `rev = <commit-id>`.
:::

To disable features:
```bash
icicle-bls12-377 = { path = "git = "https://github.com/ingonyama-zk/icicle.git", features = ["no_g2"] }
```

As explained above, the libs will be built and installed to `target/<buildmode>/deps/icicle` so you can easily link to them. Alternatively you can set `ICICLE_INSTALL_DIR` env variable for a custom install directory.
:::note
Make sure to install the icicle libs when installing a library/application that depends on icicle.

:::warning
Make sure to install icicle libs when installing a library/application that depends on icicle such that it is located at runtime.
:::

### Go: Build, Test, and Install (TODO)
Expand Down
5 changes: 3 additions & 2 deletions examples/c++/best-practice-ntt/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
# Build Icicle and the example app that links to it
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -DG2=OFF -DECNTT=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "build/icicle/backend")
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -S "${ICILE_DIR}" -B build/icicle
fi
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/example

Expand Down
5 changes: 3 additions & 2 deletions examples/c++/msm/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
# Build Icicle and the example app that links to it
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DG2=ON -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DECNTT=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "build/icicle/backend")
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DG2=ON -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -S "${ICILE_DIR}" -B build/icicle
fi
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/example

Expand Down
5 changes: 3 additions & 2 deletions examples/c++/ntt/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
# Build Icicle and the example app that links to it
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -DG2=OFF -DECNTT=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "build/icicle/backend")
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -S "${ICILE_DIR}" -B build/icicle
fi
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/example

Expand Down
3 changes: 2 additions & 1 deletion examples/c++/pedersen-commitment/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
# Build Icicle and the example app that links to it
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DG2=OFF -DECNTT=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "build/icicle/backend")
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -S "${ICILE_DIR}" -B build/icicle
fi
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/example
Expand Down
2 changes: 1 addition & 1 deletion examples/c++/polynomial-api/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void example_device_memory_view()
auto coset_evals = std::make_unique<scalar_t[]>(size);
auto ntt_config = default_ntt_config<scalar_t>();
ntt_config.are_inputs_on_device = true; // using the device data directly as a view
ntt_config.coset_gen = get_root_of_unity<scalar_t>(size * 2);
ICICLE_CHECK(get_root_of_unity<scalar_t>(size * 2, &ntt_config.coset_gen));
ntt(d_coeffs.get(), size, NTTDir::kForward, ntt_config, coset_evals.get());
}

Expand Down
3 changes: 2 additions & 1 deletion examples/c++/polynomial-api/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
# Build Icicle and the example app that links to it
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DG2=OFF -DECNTT=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "build/icicle/backend")
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -S "${ICILE_DIR}" -B build/icicle
fi
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/example
Expand Down
5 changes: 3 additions & 2 deletions examples/c++/polynomial_multiplication/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
# Build Icicle and the example app that links to it
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -DG2=OFF -DECNTT=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "build/icicle/backend")
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -DMSM=OFF -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DCURVE=bn254 -S "${ICILE_DIR}" -B build/icicle
fi
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/example

Expand Down
3 changes: 2 additions & 1 deletion examples/c++/risc0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ ICICLE_CUDA_SOURCE_DIR="${ICILE_DIR}/backend/cuda"
# Build Icicle and the example app that links to it
if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [ -d "${ICICLE_CUDA_SOURCE_DIR}" ]; then
echo "Building icicle with CUDA backend"
cmake -DCMAKE_BUILD_TYPE=Release -DFIELD=babybear -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
cmake -DCMAKE_BUILD_TYPE=Release -DFIELD=babybear -DMSM=OFF -DG2=OFF -DECNTT=OFF -DCUDA_BACKEND=local -S "${ICILE_DIR}" -B build/icicle
export ICICLE_BACKEND_INSTALL_DIR=$(realpath "build/icicle/backend")
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DFIELD=babybear -S "${ICILE_DIR}" -B build/icicle
fi
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/example
Expand Down
9 changes: 7 additions & 2 deletions examples/rust/msm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ edition = "2018"
[dependencies]
icicle-runtime = { path = "../../../wrappers/rust_v3/icicle-runtime" }
icicle-core = { path = "../../../wrappers/rust_v3/icicle-core" }
icicle-bn254 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bn254", features = ["g2"] }
icicle-bn254 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bn254" }
icicle-bls12-377 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bls12-377" }
clap = { version = "<=4.4.12", features = ["derive"] }

[features]
cuda = ["icicle-runtime/cuda_backend", "icicle-bn254/cuda_backend", "icicle-bls12-377/cuda_backend"]
cuda = ["icicle-runtime/cuda_backend",
"icicle-bn254/cuda_backend",
"icicle-bls12-377/cuda_backend",
"icicle-bn254/no_ecntt",
"icicle-bls12-377/no_ecntt"
]
2 changes: 1 addition & 1 deletion examples/rust/msm/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ if [ "$DEVICE_TYPE" == "CUDA" ] && [ ! -d "${ICICLE_BACKEND_INSTALL_DIR}" ] && [
cargo run --release --features=cuda -- --device-type "${DEVICE_TYPE}"
else
echo "Building icicle without CUDA backend, ICICLE_BACKEND_INSTALL_DIR=${ICICLE_BACKEND_INSTALL_DIR}"
export ICICLE_BACKEND_INSTALL_DIR="$ICICLE_BACKEND_INSTALL_DIR";
export ICICLE_BACKEND_INSTALL_DIR="${ICICLE_BACKEND_INSTALL_DIR}"
cargo run --release -- --device-type "${DEVICE_TYPE}"
fi
11 changes: 9 additions & 2 deletions examples/rust/ntt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ edition = "2018"
[dependencies]
icicle-runtime = { path = "../../../wrappers/rust_v3/icicle-runtime" }
icicle-core = { path = "../../../wrappers/rust_v3/icicle-core" }
icicle-bn254 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bn254", features = ["g2"] }
icicle-bn254 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bn254" }
icicle-bls12-377 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bls12-377" }

clap = { version = "<=4.4.12", features = ["derive"] }

[features]
cuda = ["icicle-runtime/cuda_backend", "icicle-bn254/cuda_backend", "icicle-bls12-377/cuda_backend"]
cuda = ["icicle-runtime/cuda_backend",
"icicle-bn254/cuda_backend",
"icicle-bn254/no_ecntt",
"icicle-bn254/no_g2",
"icicle-bls12-377/cuda_backend",
"icicle-bls12-377/no_ecntt",
"icicle-bls12-377/no_g2"
]
9 changes: 7 additions & 2 deletions examples/rust/polynomials/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ edition = "2018"
[dependencies]
icicle-runtime = { path = "../../../wrappers/rust_v3/icicle-runtime" }
icicle-core = { path = "../../../wrappers/rust_v3/icicle-core" }
icicle-bn254 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bn254", features = ["g2"] }
icicle-bn254 = { path = "../../../wrappers/rust_v3/icicle-curves/icicle-bn254" }
icicle-babybear = { path = "../../../wrappers/rust_v3/icicle-fields/icicle-babybear" }

clap = { version = "<=4.4.12", features = ["derive"] }

[features]
cuda = ["icicle-runtime/cuda_backend", "icicle-bn254/cuda_backend", "icicle-babybear/cuda_backend"]
cuda = ["icicle-runtime/cuda_backend",
"icicle-bn254/cuda_backend",
"icicle-babybear/cuda_backend",
"icicle-bn254/no_ecntt",
"icicle-bn254/no_g2",
]

Loading
Loading