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

Is wasm in the cards? #4

Open
FrankC01 opened this issue Mar 22, 2021 · 11 comments
Open

Is wasm in the cards? #4

FrankC01 opened this issue Mar 22, 2021 · 11 comments

Comments

@FrankC01
Copy link

Would like to use with bi-ossl feature from my wasm rust... any chance this is on the roadmap?

@mikelodder7
Copy link
Owner

That requires compiling openssl to wasm which is non-trivial. Better to stick with bi-rust for that portion.

@FrankC01
Copy link
Author

FrankC01 commented Mar 22, 2021

We are looking at getting OpenSSL compiled to wasm in the interim... using bi-rust inside a wasm function fails. I will get the specifics (hard to debug where it is failing) and update this comment

So within the entry point of my wasm function, I'm doing this:

let key = key::AccumulatorSecretKey::default();
let members: Vec<[u8; 8]> = vec![
        3u64.to_be_bytes(),
        7u64.to_be_bytes(),
        11u64.to_be_bytes(),
        13u64.to_be_bytes(),
    ];
let acc = rsa::accumulator::Accumulator::with_members(&key, &members);

and it fails on is_prime in hash.rs.

@mikelodder7
Copy link
Owner

Cool, looking forward to it

@FrankC01
Copy link
Author

Updated my message above

@FrankC01
Copy link
Author

Success with building the following with `--target wasm32-wasi

  1. openssl-src-rs
  2. rust-openssl
  3. accumulator-rs

At the moment it is a few hacks to environments and minor mods to openssl-src-rs/src/lib.rs

@mikelodder7
Copy link
Owner

I'm also working on a no-std version of this such that it should also work for wasm

@brianorwhatever
Copy link

@mikelodder7 you mentioned this can be compiled to wasm easier now? Can I help with that?

@mikelodder7
Copy link
Owner

I can send you a copy of the code. I haven’t integrated it into this repo yet. But if you’d like to get it up and running that’s always an option

@brianorwhatever
Copy link

that would be great!

@FrankC01
Copy link
Author

FrankC01 commented Nov 7, 2021

@mikelodder7 and @brianorwhatever --- did this ever happen?

@brianorwhatever
Copy link

not yet unfortunately.. will ping @mikelodder7 and try to move on this over the holidays

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

No branches or pull requests

3 participants