porting of programs between Wasmer and Cowasm #56
Replies: 1 comment
-
Hi @martin12333 , the way the CoWasm.sh runs subprocesses in the browser is implemented here: It's basically an implementation of "fork + exec" but entirely within a single WASM instance, which is I think simple, flexible and fast, but of course has drawbacks. The way it works is:
When running under node.js there's also a different fork/exec implementation, but it's less accurate. There's also an implementation that works very well for Python. (These are for running native subprocesses, and I care about this mainly so I can use pip to install and building C compiled Python packages from source...) The steps above are just one neat way of efficiently running programs without the complexity of multiple WebAssembly instances, which leverages this packages https://www.npmjs.com/package/dylink that I wrote. It has drawbacks, of course. cowasm could also be extended to run programs in other ways. Thanks for noticing CoWasm! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wonder, how easy or difficult will it be to port programs
// I plan to study and do experiments, EDIT: first plan:
https://github.com/sagemathinc/cowasm/blob/main/Dockerfile https://github.com/sagemathinc/cowasm#build-from-source
EDIT:
related:
Beta Was this translation helpful? Give feedback.
All reactions