bytecodealliance / wasmtime-dotnet

.NET embedding of Wasmtime https://bytecodealliance.github.io/wasmtime-dotnet/
Apache License 2.0
409 stars 52 forks source link

Update to recent Wasmtime C API changes regarding values #318

Closed kpreisser closed 2 months ago

kpreisser commented 2 months ago

Update to recent Wasmtime C API changes regarding values.

This includes updates for:

TODOs:

Note: The anyref type is not yet supported; it was introduced by the GC Proposal. Support for this type can be added separately, after deciding how the API should look like.

Fixes part of #315 (the WASI part is fixed by #316).

kpreisser commented 2 months ago

I changed the cache in the Store from #235 to use separate ConcurrentDictionary instances for each type, to avoid having to explicitly access the __private field of the externs (instead the whole struct is now compared), and is a bit more type-safe since we don't need to use a cast.