Closed kpreisser closed 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.
Update to recent Wasmtime C API changes regarding values.
This includes updates for:
TODOs:
externref
can now fail (bywasmtime_externref_new
returningfalse
). With this PR, we will throw aWasmtimeException
in that case. We need to check where that exception can be thrown, and whether we need to do any additional clean-up (e.g. when converting arguments for a function call).__private
field of externs (which has been remaned in the C API, previously it wasindex
).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).