Stream: git-wasmtime

Topic: wasmtime / issue #6222 C API wasmtime_module_t header doe...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 13:01):

krisbitney opened issue #6222:

The header just says typedef struct wasmtime_module wasmtime_module_t;. How can I get a complete type definition for the C struct?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 13:01):

krisbitney edited issue #6222:

The header just says typedef struct wasmtime_module wasmtime_module_t;. How can I get a complete type definition for the C struct to pass into wasmtime_module_new?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 13:02):

krisbitney edited issue #6222:

The header just says typedef struct wasmtime_module wasmtime_module_t;. How can I get a complete type definition for the C struct so I can allocate it and pass it into wasmtime_module_new?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 13:05):

bjorn3 commented on issue #6222:

See one of the examples:

https://github.com/bytecodealliance/wasmtime/blob/91de5de049272deb1a592e85839d2c638bee5e52/examples/gcd.c#L66-L67

wasmtime_module_t is always behind a pointer. You should start with a null pointer and then have wasmtime_module_new write the actual pointer value.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 13:06):

krisbitney commented on issue #6222:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 13:06):

krisbitney closed issue #6222:

The header just says typedef struct wasmtime_module wasmtime_module_t;. How can I get a complete type definition for the C struct so I can allocate it and pass it into wasmtime_module_new?


Last updated: Dec 23 2024 at 12:05 UTC