filecoin-project / ec-gpu

OpenCL code generator for finite-field arithmetic over arbitrary prime fields
Other
91 stars 61 forks source link

fix: enable dependency resolver v2 for workspace #33

Closed vmx closed 2 years ago

vmx commented 2 years ago

Using resolver version 2 (which is default in Rust editiion 2021), it is possible to run cargo build --target wasm32-unknown-unknown without any failures. Note that even before this change it was possible when ec-gpu-gen was used as a dependency, but with this change it becomes more apparent.

The problem was that the rand dev-dependency was enabling the std feature, which then led to ff pulling is getrandom, which has problems to be compiled to wasm32-unknown-unknown without setting the js feature.

Closes #32.

samuelburnham commented 2 years ago

Any reason not to upgrade to Rust 2021 or would you prefer to do that in a separate release?

vmx commented 2 years ago

Any reason not to upgrade to Rust 2021 or would you prefer to do that in a separate release?

Good point. I just tried. Going to Rust 2021 doesn't solve the problem. I'll do a PR though, as bundling breaking changes in a single release makes sense.