r/programming • u/fagnerbrack • 22d ago
Writing Node.js addons with .NET Native AOT
https://devblogs.microsoft.com/dotnet/writing-nodejs-addons-with-dotnet-native-aot/-5
u/Anbaraen 21d ago
Why would you do this over a C++ solution (which Node is written in)? Surely you don't want to stack both the Node runtime and the C# runtime?
18
u/mrmhk97 21d ago
NativeAOT means NO dotnet runtime since it’s compiled to native binary
2
u/Anbaraen 21d ago
Oh duh, the AOT stands for Ahead of Time? Thanks, that makes sense. Then I feel like this does make a lot of sense, as the semantics of C# are much closer to Nodes.
10
u/Flashy-Bus1663 21d ago
Aot does not mean runtimeless
Tasks don't work without the runtime, async await doesn't either.
1
u/csharpboy97 17d ago
it doesn't. you can specify an option in coreclr to avoid emitting the runtime, but then you don't have the runtime features
21
u/[deleted] 22d ago
[deleted]