|
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1, v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2 |
|
| #
c14dd11b |
| 20-Oct-2025 |
Alex Crichton <[email protected]> |
Add a new `ResourceDynamic` type (#11885)
* Move `ResourceAny` to its own submodule
In preparation for upcoming other refactorings...
* Move `Resource<T>` to its own submodule
* Move `ResourceTy
Add a new `ResourceDynamic` type (#11885)
* Move `ResourceAny` to its own submodule
In preparation for upcoming other refactorings...
* Move `Resource<T>` to its own submodule
* Move `ResourceType` to its own submodule
* Move host resource table infrastructure to its own module
* Add module documentation to resource-related modules
* Add a new `ResourceDynamic` type
This commit adds a new type `wasmtime::component::ResourceDynamic` to the embedding API which internally is more-or-less the same as `Resource<T>` but with different type information. This `ResourceDynamic` specifically enables storing runtime information for managing the type of the resource as opposed to `Resource<T>` which requires static information.
The main goal of this type is to enable exposing resources in the C API of Wasmtime. Currently there is no way to define different resource types in the C API because the only option is `Resource<T>`. With this type it will be possible to create distinct resource types in the C API for embedders to use.
cc #11437
* Apply suggestions from code review
Co-authored-by: Joel Dice <[email protected]>
---------
Co-authored-by: Joel Dice <[email protected]>
show more ...
|