Support for native AOT & static linking#348
Conversation
the project is configured to always download the pre-release version of wasitime outside of a publish workflow - 'dev' has breaking changes. This resolves them and bumps to 38.0.3
|
CC: @peterhuene & @jsturtevant |
Personally I would like to keep keep .NET Standard 2.1 support until Unity supports CoreCLR, after that I wouldn't have a usecase for it. Anyone stuck using .NET Framework would probably want it kept beyond that. |
|
Sorry for the delay on reviewing this! Overall it looks pretty good. The only big issue is some changes that are unrelated to native AOT. I assume you were having issues due to the devbuild flag, which is now turned off by default so that should no longer be necessary. |
I’ll find some time next week to rebase it on main. |
Gives consumers of wasmtime-dotnet the ability to statically link the native libraries into their executable when publishing with AOT compilation.
I also added all the necessary attributes on the reflection codepaths.
produces:
My recommendation would be to drop support for .NET Standard 2.1 to take advantage of static abstract members in interfaces to avoid using things like Activator.CreateInstance - and introduce a source generator to to remove all dependencies on reflection. But for my use-case this PR is sufficient and unblocks me.
Resolves #293