Post

Today I'm releasing AotAnywhere, a package which enables cross platform publishing support for dotnet NativeAOT. Before this package you had to use multiple different runners, with AotAnywhere you can publish for all targets from any single host. This is continuing the great work of @migeel.sk

8 reposts19 likes

Thanks, I needed Fable to get me over the line with this 😅 I've been trying to get this matrix green for a while now, and the final big hurdle was how to build for macOS on non-macOS hardware without shipping the SDK (which is prohibited), that's solved now by generating the stubs.

I've swapped our multi-runner job at work, and now just have a single runner producing our native cli, and it's working great.

I've got some sample projects that I want to move to this. NAOT tool packaging is a pain in the butt right now, and I think the base SDK might prevent doing multi-RID publishing for tools on the assumption that we won't ever work with it.

I am very interested in that part - so you managed to find a way to generate a stub macOS SDK that can be legally redistributed, unlike the original one? I would love to try it in my current cross-compilation workflows that use the original SDKs copied over to Linux

Have you tried it with .NET 11? We introduced some interesting new CryptoKit things that maybe might make things a little more difficult. More symbols, at least.

I see it's using Zig for the cross-compilation toolchain, if you ever want to try using clang-llvm instead, let me know. I've got my own prebuilt distribution which I've used for cross-compilation of C/C++ and even Rust with cmake. We could get rid of the cmake part for NativeAOT in C#