Dakror opened Issue #2521:
Using release v0.21.0 on x64 Linux, i can't use the error-related functionality since the
wasmtime_error_t
struct does not seem to be present in the C API.
Dakror labeled Issue #2521:
Using release v0.21.0 on x64 Linux, i can't use the error-related functionality since the
wasmtime_error_t
struct does not seem to be present in the C API.
bjorn3 commented on Issue #2521:
Are you using
wasm.h
instead ofwasmtime.h
?wasmtime_error_t
is defined inwasmtime.h
: https://github.com/bytecodealliance/wasmtime/blob/0b6b3d0b7a3740c96df382c746060b4eed8068fc/crates/c-api/include/wasmtime.h#L43
Dakror commented on Issue #2521:
No i am not. Exploring the Macro definition you can see its defined in terms of itself, which can't be right:
![image](https://user-images.githubusercontent.com/2452821/102535042-ecb60500-40a7-11eb-9376-f91cdbb30b44.png)
Dakror edited a comment on Issue #2521:
No i am not. Exploring the Macro definition you can see its defined in terms of itself without any contents, which can't be right:
![image](https://user-images.githubusercontent.com/2452821/102535042-ecb60500-40a7-11eb-9376-f91cdbb30b44.png)
bjorn3 commented on Issue #2521:
typedef struct wasmtime_error_t wasmtime_error_t
means that the typewasmtime_error_t
is defined as the partial typestruct wasmtime_error_t
. A partial type is a type whose actual content is not yet defined. This is often used as forward reference, but in this case it is used as opaque type to not give the C code direct access to it's contents.
bjorn3 edited a comment on Issue #2521:
typedef struct wasmtime_error_t wasmtime_error_t
means that the typewasmtime_error_t
is defined as the partial typestruct wasmtime_error_t
. A partial type is a type whose actual content is not yet defined. This is often used as forward reference, but in this case it is used as opaque type to not give the C code direct access to it's contents. Typedefing something to a struct with the same name is often used to avoid explicitly having to write out thestruct
prefix.
Dakror commented on Issue #2521:
I see, thanks for the explanation. But the issue still remains that the information for the type is missing at link time.
bjorn3 commented on Issue #2521:
Types don't exist at link time, only functions and global variables. What is the link error?
Dakror commented on Issue #2521:
I have seem to have misunderstood that part of the api and thought the wasmtime_error_message method was usable to just retrieve the last error during compilation which its not. I got things working now using the method properly. Thanks for your support
Dakror closed Issue #2521:
Using release v0.21.0 on x64 Linux, i can't use the error-related functionality since the
wasmtime_error_t
struct does not seem to be present in the C API.
Last updated: Dec 23 2024 at 12:05 UTC