bytecodealliance / wasmtime-dotnet

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

Function Wrapper Cache #236

Closed martindevans closed 1 year ago

martindevans commented 1 year ago

Added a cache to Function which stores wrapped function. This allows Wrap to be called multiple times without lots of allocations of the same thing.

This will work well with #235 - a Caller can ask for a Function object (cached) and then wrap it (cached) and then call it, all without allocating anything 🥳

martindevans commented 1 year ago

I've regenerated that file and pushed it 👍