sagemathinc / cowasm

CoWasm: Collaborative WebAssembly for Servers and Browsers. Built using Zig. Supports Python with extension modules, including numpy.
https://cowasm.org
BSD 3-Clause "New" or "Revised" License
482 stars 23 forks source link

Support importing host functions #33

Closed cohix closed 1 year ago

cohix commented 1 year ago

Hello... EXCELLENT project you've got here. I'm the founder of Suborbital, and we're currently investigating different ways to support Python in our E2 Core project and our SE2 platform. This project seems like it would be a very good method.

In order to use this, I'd love to know if it's currently possible to import functions from the Wasm host? We use Wasmtime, and have a set of host functions that we make available to the runtime (such as making HTTP requests, etc), and in other languages like Rust, you can import these host-provided functions to call them. (example from our SDK)

If this is possible, I'd love to learn how, and we'd love to build a prototype of Python support using zython.

If it's not possible, we'd love to contribute to the project and help out any way we can (code, testing, sponsorship, anything!)

Please let me know :)