1 #ifndef WASMTIME_COMPONENT_INSTANCE_H
2 #define WASMTIME_COMPONENT_INSTANCE_H
3 
4 #include <wasmtime/conf.h>
5 
6 #ifdef WASMTIME_FEATURE_COMPONENT_MODEL
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 /// \brief Representation of a instance in Wasmtime.
13 ///
14 /// Instances are represented with a 64-bit identifying integer in Wasmtime.
15 /// They do not have any destructor associated with them. Instances cannot
16 /// interoperate between #wasmtime_store_t instances and if the wrong instance
17 /// is passed to the wrong store then it may trigger an assertion to abort the
18 /// process.
19 typedef struct wasmtime_component_instance {
20   /// Internal identifier of what store this belongs to, never zero.
21   uint64_t store_id;
22   /// Internal index within the store.
23   size_t index;
24 } wasmtime_component_instance_t;
25 
26 #ifdef __cplusplus
27 } // extern "C"
28 #endif
29 
30 #endif // WASMTIME_FEATURE_COMPONENT_MODEL
31 
32 #endif // WASMTIME_COMPONENT_INSTANCE_H
33