wasmtime-dotnet
wasmtime-dotnet copied to clipboard
wasmtime NetStandard 2.0
Hi,
In order to use this inside Unity, I've 'ported' the system to NetStandard2.0. It was a fairly quick port, but didn't modify too much of the code. I would be much more comfortable if there was an official port. Or #if 's in the code to handle it.
I'm happy to put my code somewhere if you want to see it, but I'm sure it's inferior to what the author of the module would do.
Cheers, Ryan.
Hi @onehundredfeet. Sorry for the delayed response as I've had most of October off.
The biggest hurdles with supporting netstandard 2.0 is the lack of Span, BinaryPrimatives, and nullable reference types (i.e. C# 8.0).
There are some unsupported hacks one can do to enable C# 8.0 with a netstandard2.0 TFM, but I'd rather not do that (or lots of #ifs in the code if we can avoid either).
However, I don't want this to be a barrier to adoption, but it does seem that the Unity folks are busy updating to a more recent version of Mono which should bring netstandard 2.1 support (maybe even net5.0 if we're lucky?).
Perhaps the best course of action is to wait and see if Unity will release a new version soon rather than hack this library to work with a 3 year old TFM.
No worries.
Most of what is needed, span etc, has been made available with system.memory. I’ve successfully got wasmtime up and running in unity with minimal changes. I’ve checked it into my branch if you’re ever curious.
I’ve checked it into my branch if you’re ever curious.
Hi @onehundredfeet , sorry to be a bother, but do you have your version of wasmtime uploaded anywhere?
I'd be happy to throw a PR together for it (if I can get it working...)
@onehundredfeet are you able to share your Unity specific branch?
PR #94 upgrades to .Net 6? Does that address this issue so it can be closed?
PR #162 set the target to netstandard2.1 which should work in Unity.