wasmerio / wasmer

🚀 The leading Wasm Runtime supporting WASIX and WASI
https://wasmer.io
MIT License
19.09k stars 819 forks source link

Add support for filesystem in the Wasmer C API #3043

Closed syrusakbary closed 2 years ago

syrusakbary commented 2 years ago

Right now, create-exe works great when compiling an standalone wasm file to an executable. The python package consists of:

However, when doing it with wapm packages such as Python (which had a filesystem), we also need to embed the filesystem (as binary) in the compiled executable, so we can cross-compile the wapm python package to a self-working python.exe (just one file) that has the wasm file contents compiled statically, and also the filesystem binary contents.

syrusakbary commented 2 years ago

Outcome:

Wasmer should support creating executables from wapm packages (that are self-contained)

Before, only the create-exe from .wasm would work:

wasmer create-exe cowsay.wasm

But now, the following with ALSO work:

wasmer create-exe python.package
syrusakbary commented 2 years ago

State of the art:

fschutt commented 2 years ago

Technically this can be closed now, we shipped this as part of the pirita changes in wasmer-private/create-obj-pirita in the wasmer.h.