filecoin-project / ec-gpu

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

Add Wasm support to ec-gpu-gen #32

Closed samuelburnham closed 2 years ago

samuelburnham commented 2 years ago

This PR allows the following command to build:

cargo build --target wasm32-unknown-unknown

It also supports the cuda feature, but not opencl due to its dependency on libc.

This would move bellperson's getrandom dependency to ec-gpu-gen, and at least in theory would allow the former to use CUDA on Wasm. In practice it doesn't yet work due to the fs2 dependency, but if it's useful maybe that can be fixed.

vmx commented 2 years ago

I don't think that's needed. When ec-gpu-gen is used as a dependency, it should just compile fine on the wasm32-unknown-unknown target. Am I missing something?

vmx commented 2 years ago

@samuelburnham I've created https://github.com/filecoin-project/ec-gpu/pull/33 to make things more apparent.