Couldn't that be done with WASM today? It looks like a few people have managed to build GMP targeting WASM.
You might miss out on some SIMD operations, but you'd be able to do 90% of what you'd want with scientific calcs. (admittedly, it'd be nice if this were part of the language).