Skip to content
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

WASM Support #32

Open
celaus opened this issue Jun 29, 2018 · 2 comments
Open

WASM Support #32

celaus opened this issue Jun 29, 2018 · 2 comments

Comments

@celaus
Copy link

celaus commented Jun 29, 2018

Hi! This might be a bit of a weird one, but it would be great to have WASM support for this crate 😄

... which I have gotten to work, but now I am not sure how to contribute back to you guys :) there are two major changes that I had to implement:

  • using rand's PRNG (the OS RNG doesn't work yet...) for here
  • remove/make timing optional here 👍

Now I'd be happy to integrate this somehow, but I am not sure how to do this without rewriting half the seq module or removing things like the timing and replacing thread_rng (where I don't know the difference in quality to XorShiftRng). Alternatively it could live as its own compilation unit for the wasm target, but that would duplicate code which is also not great 😅

What are your ideas? I am happy to help 👍

@m-decoster
Copy link
Owner

Cool! Thanks for implementing WASM support.

I see you have forked the repository. If you would push your code to your local repository I could have a look and get a better idea.

In the mean time, we might get this to work with conditional compilation without having to change too much, i.e. use #[cfg(...)]. Do you think that would be possible?

@celaus
Copy link
Author

celaus commented Jul 3, 2018

Hi @m-decoster - I'll push the code as soon as I can 👍

I think the #[cfg()] path would definitely work, we'll need to figure out where it should go though 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants