Update the C API with module linking support (#2472)
* Update the C API with module linking support
This commit does everything necessary (ideally) to support the module
linking proposal in the C API. The changes here are:
* New `wasm_{module,instance}type_t` types and accessors
* New `wasm_{module,instance}_type` functions
* Conversions between `wasm_extern_t` and `wasm_{instance,module}_t`, as
well as `wasm_externtype_t` and the new types.
* Addition of `WASM_EXTERN_{MODULE,INSTANCE}` constants
* New `wasm_config_t` modifier to enable/disable module linking
With these functions it should be possible to pass instances/modules to
instances and also acquire them from exports. Altogether this should
enable everything for module linking.
An important point for this is that I've opted to add all these items
under the `wasm_*` name prefix instead of `wasmtime_*`. I've done this
since they're all following the idioms of existing APIs and while not
standard the intention would be to standardize them (unlike many other
Wasmtime-specific APIs).
cc #2094
* Appease doxygen
This commit is contained in:
@@ -793,8 +793,15 @@
|
||||
* \typedef wasm_externkind_t
|
||||
* \brief Classifier for #wasm_externtype_t, defined by #wasm_externkind_enum
|
||||
*
|
||||
* This is returned from #wasm_extern_kind and #wasm_externtype_kind to
|
||||
* determine what kind of type is wrapped.
|
||||
*
|
||||
* \enum wasm_externkind_enum
|
||||
* \brief Kinds of external items for a wasm module.
|
||||
*
|
||||
* Note that this also includes #WASM_EXTERN_INSTANCE as well as
|
||||
* #WASM_EXTERN_MODULE and is intended to be used when #wasm_externkind_t is
|
||||
* used.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user