shareup / cwasm3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not use wasi without the extra/wasi_core.h

gossmer opened this issue · comments

adding extra/wasi_core.h from wasm3 into the Sources/CWasm3 allow for the call to m3_LinkWASI to work and wasi is then available in a wasm module.

You also need to add in the package defines:

    cSettings: [
        .define("APPLICATION_EXTENSION_API_ONLY", to: "YES"),
        .define("d_m3MaxDuplicateFunctionImpl", to: "10"),
        .define("__wasi__", to: "YES"),
        .define("d_m3HasWASI", to: "YES")
    ]