Closed
Description
Hello,
As there is a reflection about a dedicated export attribute in #64, I wondered if there would be any interest for an import attribute?
With a string argument, it may allow imports from multiple modules/host-namespaces, lifting the restriction on --allow-undefined-file to import only from "env".
It would make it more convenient for embeders to specify their API, and users to compile against it.
// env.h
__attribute__((wasm_import("env"))) void print_i32(int32_t);
__attribute__((wasm_import("env"))) void print_i64(int64_t);
...
// test.c
#include <env.h>
__attribute__((wasm_export)) void hello() { print_i32(789); }
Thanks,
JB.
Metadata
Metadata
Assignees
Labels
No labels