-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make getrandom behind the wasm feature flag #17
Conversation
You need to enable |
It works, the only issue is that requires |
Ah I see. In this case, I think that probably |
Also, could you set up commit signing on your side? Repo settings will not allow merging any unsigned/unverified code. |
I do have code signing enabled, github for some reason when using codespaces does not work well. Will sign all the commits and push first. |
Hey @survived is it okay to add Nix & flake devenv files to this repo? It makes development consistent across different machines and easier to set up. |
I'll let @maurges decide, he's fan of nix, so he'll probably be reviewing that part :) |
The nix shell would only contain cargo+rustc (and libc) though? Or do you want to setup a flake for compiling to wasm as well? |
Also Related: LFDT-Lockness/stark-curve#4 |
Just the dev shell, no packaging or build using nix are required, so the same tooling and workflow would stay the same, only the initial setup of the repo. Also, I'm using |
I've pushed most of the updates, I do have one more test to add in the CI to ensure that WASM + no_std works. |
@shekohex actually, we've decided that we don't want to have nix file in the repo. I assume, in your workflow you could put nix file to parent dir and it would work fine with |
Yeah, that works, no worries. I just did not push any nix related nor direnv files to the repo, so we are good. |
we will also need a new version of stark curve crate so we can get the example that uses no_std to work. |
|
Could you please now run the CI? |
I don't see a button to run a CI. Could you push another commit (or do |
@shekohex nostd example doesn't build on CI it seems. Do you have access to build logs? |
It builds! https://github.com/dfns/generic-ec/actions/runs/7855819173/job/21475955726?pr=17 |
You should be able to exclude them by adding |
Thanks for the tip, I've updated the |
You can try the commands locally as well! |
Seems like it requires a workspace flag now |
Done! |
Let me just check with our security team what's our procedure, they could also want to review PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
Greetings, I am attempting to utilize genaric-ec (using cggmp21) by compiling it with the no_std feature and running it in wasm (albeit not in the browser). I initially believed that the compilation would be flawless, however, due to the requirement for getrandom (even without the wasm feature), the compilation fails and complains about the absence of the get random implementation.
Before this change, running
cargo b -p generic-ec --no-default-features --target wasm32-unknown-unknown
result in the following error:With this change, running
cargo b -p generic-ec --no-default-features --target wasm32-unknown-unknown
compiles without issues.