vhnatyk / emerald-city

WASM/HW-friendly lightweight client application for threshold ECDSA
GNU General Public License v3.0
3 stars 1 forks source link

Dev/vhnat/wasm draft #1

Closed vhnatyk closed 5 years ago

vhnatyk commented 5 years ago

@omershlo Here in this draft PR is only WASM specific diff to dev/vhnat/secp256-clean that is PR #6

You can run tests in wasm in chrome using wasm-pack with wasm-pack test --chrome --release. Adding --node argument will runt tests and/or on node.

Test test_serdes_bad_pk is ignored for now on wasm. Unfortunately #[wasm_bindgen(catch)] doesn't work as expected. More details here I rewrote one test test_wrong_homo_elgamal to eliminate #[should_panic], but test_serdes_bad_pk panics as intended - so it either should be rewritten to test the same case without panic - or perhaps it can

Surprisingly performance of --release configs is quite ok and on par with default desktop/leptop targets 👍

omershlo commented 5 years ago

cool! @vhnatyk I merged your code without the wasm specific part from this pr. What do you think about adding this code in a folder in master branch and adding a readme with instructions on how to use?