accumulator-rs icon indicating copy to clipboard operation
accumulator-rs copied to clipboard

Is wasm in the cards?

Open FrankC01 opened this issue 4 years ago • 11 comments

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

FrankC01 avatar Mar 22 '21 10:03 FrankC01

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

mikelodder7 avatar Mar 22 '21 14:03 mikelodder7

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.

FrankC01 avatar Mar 22 '21 15:03 FrankC01

Cool, looking forward to it

mikelodder7 avatar Mar 22 '21 16:03 mikelodder7

Updated my message above

FrankC01 avatar Mar 25 '21 09:03 FrankC01

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

FrankC01 avatar Mar 26 '21 08:03 FrankC01

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

mikelodder7 avatar Aug 11 '21 15:08 mikelodder7

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

brianorwhatever avatar Nov 04 '21 17:11 brianorwhatever

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

mikelodder7 avatar Nov 04 '21 17:11 mikelodder7

that would be great!

brianorwhatever avatar Nov 04 '21 18:11 brianorwhatever

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

FrankC01 avatar Nov 07 '21 18:11 FrankC01

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

brianorwhatever avatar Dec 09 '21 19:12 brianorwhatever