The code you want to use has to compile to Webassembly.
This is in fact possible for C# and Python, but especially in the browser you would want to have a small binary size, and avoid bringing along the whole runtime of these managed languages if all you want is a small functionality subset.
A very viable solution would be creating a decimal package with either a native Rust crate (I think there are a few decimal implementations) or with one of the goto C libraries.
In her wasm summit presentation [1], Ashley Williams had a slide that showed a different picture. AssemblyScript came out with the smallest footprint, while Rust and C (through Emscripten) had bigger footprints--the slide is qualitative.
An article posted last week on HN [2] also seems to support this hypothesis, this time with some numbers. The AssemblyScript program had 6% the filesize of the Rust program.
So it seems like, if you want small wasm libraries, AssemblyScript may be your best shot.
This is in fact possible for C# and Python, but especially in the browser you would want to have a small binary size, and avoid bringing along the whole runtime of these managed languages if all you want is a small functionality subset.
A very viable solution would be creating a decimal package with either a native Rust crate (I think there are a few decimal implementations) or with one of the goto C libraries.
That would be much smaller and faster as well.