From 35bca58de12ed4519795466d40b5c0989014ad4f Mon Sep 17 00:00:00 2001 From: CPerezz Date: Thu, 4 Jan 2024 16:57:38 +0100 Subject: [PATCH] chore: Suggest a way to import the lib in README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 800358bd..32a555a6 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,15 @@ Notice that if the `multicore` feature is active, the library will not compile t This is because WASM architectures at the time of writing this still don't handle parallelism properly. See: [Rayon: Usage with WwbAssembly](https://github.com/rayon-rs/rayon#usage-with-webassembly) for more info. +A way to import this library into the project that works this arround (in case you might compile to `wasm`-targets) could be as follows: +```toml +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +halo2curves = { version = "0.5.0", features = ["derive_serde", "multicore"] } + +[target.'cfg(target_arch = "wasm32")'.dependencies] +# bypass the default "multicore" feature +halo2curves = { version = "0.5.0", default-features = false, features = ["derive_serde", "multicore"] } +``` ## Benchmarks Benchmarking is supported through the use of Rust's built-in test framework. Benchmarks can be run without assembly optimizations: