-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor * refactor * refactor: add rust docs * Update README.md Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com> * Update README.md Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com> * refactor * Update icicle/README.md Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com> * Update wrappers/rust/README.md Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com> * Update README.md Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com> * refactor * remove --------- Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com>
- Loading branch information
1 parent
d5dd16d
commit dcaa0b4
Showing
4 changed files
with
113 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
### Rust Bindings | ||
|
||
`icicle-core` defines all interfaces, macros and common methods. | ||
|
||
`icicle-cuda-runtime` defines `DeviceContext` which can be used to manage a specific GPU as well as wrapping common CUDA methods. | ||
|
||
`icicle-curves` implements all interfaces and macros from `icicle-core` for each curve. For example `icicle-bn254` implements curve `bn254`. Each curve has its own [build script](./icicle-curves/icicle-bn254/build.rs) which will build the CUDA libraries for that curve as part of the rust-toolchain build. | ||
|
||
## Building a curve and running tests | ||
|
||
Enter a curve implementation. | ||
|
||
``` | ||
cd icicle-curves/icicle-bn254 | ||
``` | ||
|
||
To build | ||
|
||
```sh | ||
cargo build --release | ||
``` | ||
|
||
The build may take a while because we are also building the CUDA libraries for the selected curve. | ||
|
||
To run benchmarks | ||
|
||
``` | ||
cargo bench | ||
``` | ||
|
||
To run test | ||
|
||
```sh | ||
cargo test -- --test-threads=1 | ||
``` | ||
|
||
The flag `--test-threads=1` is needed because currently some tests might interfere with one another inside the GPU. |