Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-c-api lacks an import reflection example - one attached. #137

Open
adv-sw opened this issue May 3, 2020 · 1 comment
Open

wasm-c-api lacks an import reflection example - one attached. #137

adv-sw opened this issue May 3, 2020 · 1 comment

Comments

@adv-sw
Copy link

adv-sw commented May 3, 2020

Hi all,

Was trying to figure out what imports were required by a wasm I'd just loaded & couldn't spot a suitable example. Have created one with help from the wasmtime guys - thank you.

Please consider adding this to wasm-c-api examples to help others wanting to accomplish the same thing.

Example output:

Initializing...
Loading binary...
Compiling module...
Extracting imports...
import 0 "create_native" func i32 -> i32
import 1 "release_native" func i32 -> i32
Shutting down...

Cheers,
Steve.
imports.c.txt

@FGasper
Copy link

FGasper commented Jun 1, 2021

NB: This would be a bit more complete with the inclusion of wasm_importtype_module().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants