4 ms·
> I don't understand WASM, but I read that a big draw of WASM is it's ability to provide portability to any language. This would mean Python libraries that depe
by hardwaresofton 2y ago
> I don't understand WASM, but I read that a big draw of WASM is it's ability to provide portability to any language. This would mean Python libraries that depend on an unpopular C library (which could be lost to time) could instead be a single WASM blob.
Yes, this is a key value of WebAssembly compared to other approaches, it is a relatively (compared to a container or a full blown VM) lightweight way to package and distribute functionality from other languages, with high performance and fast startup. The artifact is minimal (like a static/dynamic library, depending on how much you've included), and if your language has a way to run WASM, you have a way to tap into that specialized computation.
- pjmlp 2y agoIronPython alongside C++/CLI on the CLR, everything compiled down to MSIL bytecodes.
- Capricorn2481 2y agoI could be wrong, but I can't find anything about how to include your C dependencies with IronPython when you compile. Instead I see that IronPython has limited compatibility with the Python ecosystem because of Python libraries using C. Contrasted with WASM where you can write in any language and bring the ecosystem with you, since it all compiles down.
- hardwaresofton 2y agoFully agree with your point here, but wanted to point out that including C dependencies is actually one of the biggest reasons why Python support is hard for WebAssembly too. Bolstering your point -- smart-and-hardworking people are working on this, which results in: https://github.com/bytecodealliance/componentize-py/ https://github.com/bytecodealliance/componentize-py/ which inspired https://github.com/WebAssembly/component-model/blob/main/design/mvp/examples/SharedEverythingDynamicLinking.md https://github.com/WebAssembly/component-model/blob/main/des... with some hard work done to make things work: https://github.com/dicej/wasi-wheels https://github.com/dicej/wasi-wheels It's a fun ecosystem -- the challenge is huge but the work being done is really fundamentally clean/high quality, and the solutions are novel and useful/powerful.
- pjmlp 2y agoYou compile them with C++/CLI, which is why I referred to it, no different than using emscripten.