Compiling GNU MP Library as WASM

Job ID: 30685636

Budget: $30 – $250 USD

I want to call WASM binary that does heavy computations from browsers and mobile phones. Thus, I need GMP library (https://gmplib.org/) compiled as WASM.

In my knowledge so far, wasi or emscripten would do the job.

https://github.com/torquem-ch/gmp-wasm
https://github.com/kripken/gmp.js?files=1

Deliverables
Reproducible instruction on how to generate wasm binary from GMP library.
Demonstration that the wasm binary is working on the browser with an argument (i.e. running "./wasm 2" logs 1.4142135624)
Related categories: C Programming Assembly