Testing latest pari + WASM + node.js... and it works?! Wow.
1#include <stdio.h> 2#include <gmp.h> 3int main() 4{ 5 mp_limb_t *x = NULL, *y = NULL; 6 long nx = 0; 7#ifdef mpn_sqr 8 mpn_sqr(y, x, nx); 9#else 10 mpn_mul_n(y, x, x, nx); 11#endif 12 return 0; 13} 14 15