Open NinoScript opened 3 months ago
One possible solution would be to use the rayon
feature of cozo-core
in the cozo-lib-python
crate:
[dependencies]
- cozo = { version = "0.7.6", path = "../cozo-core", default-features = false }
+ cozo = { version = "0.7.6", path = "../cozo-core", features = ["rayon"] }
(maybe it affects other crates too, I haven't checked)
The code that uses rayon
is already conditional, but it is testing for not(wasm32)
instead of rayon
itself.
So, another possible solution would be to change these to check for rayon
directly:
- #[cfg(not(target_arch = "wasm32"))]
+ #[cfg(rayon)]
use rayon::prelude::*;
- #[cfg(not(target_arch = "wasm32"))]
+ #[cfg(rayon)]
{ /* ... */
let execs = prog
.par_iter()
(assuming there's no other reason for those target_arch
checks)
Let me know you're ok with any of these solutions and I'll contribute with a PR
There's code that unconditionally uses
rayon
even though it is an optional dependency. This makes me unable to buildcozo-lib-python
, as it fails with this error message: