Closed
Description
Related to #119
We currently depend on the following symbols:
malloc
free
(We additionally depended on abort
and printf
until #115 )
This prevents use with rust-wasm for this library and all downstream users (e.g. rust-bitcoin). While doing any cryptography in a browser is very ill-advised, rust-secp does a lot more than just signing and verification (it can also parse and display keys), and its downstream deps such as rust-bitcoin do many things that certainly should be possible and easy to do with rust-wasm.
We also don't want to encourage users to find other pure-Rust secp256k1 libraries with dramatically less review and QA on them, and to use these in a Bitcoin context.
See rust-bitcoin/rust-bitcoin#240 for earlier discussion.
Metadata
Metadata
Assignees
Labels
No labels
Activity
apoelstra commentedon Jul 4, 2019
I was able to get a wasm application working which parses and Javascript
alert
s a public key. Unfortunately to do so I needed tocontext_create
andcontext_destroy
(this I expected).context_create
,scratch_space_create
,context_destroy
,scratch_space_destroy
from the libsecp source. Deleting the FFI bindings was not enough (this I did not expect).elichai commentedon Jul 4, 2019
Yeah, we need to eliminate the symbols, we don't use the scratch space, right?
apoelstra commentedon Jul 4, 2019
Correct, we do not use the scratch space. (It will eventually be used for MuSig but before then we'll figure out a preallocated solution for it.)