Assembly Expert for Compiling GNU MP Library as WASM -- 2

Job ID: 30694977

Budget: $10 – $100 USD

DELIVERABLES

1. Reproducible instruction on how to generate a standalone wasm binary that calls functions in the GMP library (with the latest version - GMP 6.2.1). (Linux environment)

2. Demonstration that the wasm binary is working on the browser using javascript with an argument (i.e. calling "./wasm 2" should return 1.4142135624...)


GMP is a multi-precision library (https://home.cs.colorado.edu/~srirams/courses/csci2824-spr14/gmpTutorial.html)

I want a .wasm binary that calls functions from the GMP library.

I know it is possible. There are two git repositories that have achieved this.

I hope these links are helpful.

1. https://github.com/WebAssembly/wasi-sdk
2. https://github.com/kripken/gmp.js
3. https://stackoverflow.com/questions/41080815/compiling-gmp-mpfr-with-emscripten
4. https://emscripten.org/docs/compiling/Building-Projects.html

However, I am having a hard time doing this because I am new to web assembly and it seems like the GMP library is a unique library that needs some flags to compile.

**************** Use Linux OS **********************************