AOT Compatibility
I'd like to suggest some improvements to make wasmtime-dotnet more AOT friendly. I'm thinking along the lines of enabling static linking against wasmtime, which could really improve scenarios where the C# assembly is AOT compiled.. More details about .NET's native AOT and how it interops with native code can be found here: Native AOT with .NET.
Why This Matters:
AOT offers significant performance improvements and having wasmtime-dotnet support this more seamlessly would be a huge win. It could enhance the library's usability in high-performance scenarios.
Suggested Changes:
- Enable static linking in wasmtime-dotnet.
- Ensure compatibility with .NET AOT binaries.
I'm happy to implement the necessary changes myself if it is something that will be accepted.
Hi @andrewmd5, thanks very much for the informational request!
I definitely think this would be something we would accept, but I'm not entirely sure what the work entails. Is it mostly just a different way of building the project?
Hey @andrewmd5, what problems did you encounter specifically? I have an AWS Lambda function that is NativeAOT (.Net 8) and it seems to work fine with Wasmtime running a server side wasm module (so far).
IIRC this was an upstream issue in ARM64 Windows because those native builds didn’t exist for wasmtime. I’m unsure if any progress was made there.
Edit: looks like this can be closed https://github.com/bytecodealliance/wasmtime-dotnet/issues/298