Closed diclophis closed 3 years ago
Directly doing networking from inside wasm? Wasmer doesn't provide any functionality to do that, as far as I know. (WASI has some related function calls but wasmer leaves them unimplemented.) You can of course provide your own imports!
that allow for that. (But I would question if it's appropriate for a user-defined step in an ETL pipeline to do user-defined network IO.)
the best way to "capture" the result of any compute performed inside of a wasm module....
Probably the most lightweight way is to have your wasmer functions return a pointer to the wasmer memory, which you then read from your ruby code. (I hope this is possible from ruby. For a Rust example, see here.)
have the module read in a file, and write out a file
That sounds heavy. But it's of course possible.
@jcaesar ok thanks, your points seem reasonable.
Summary
What support exists in wasmer (specifically the wasmer-ruby wrapper) to provide TCP/HTTP networking facilities to wasm modules?
I am intrigued with the notion of utilizing wasm as part of a user-definable ETL pipeline, however I have not identified the best way to "capture" the result of any compute performed inside of a wasm module.... My initial thought is, have the module read in a file, and write out a file (given there is some file system support), and then do the networking at the "host" layer before and after the module is invoked (pre-fetching the file for input, and sending the output file onward to subsequent systems in the pipeline)