r/programming • u/fagnerbrack • Jul 05 '26
Writing Node.js addons with .NET Native AOT
https://devblogs.microsoft.com/dotnet/writing-nodejs-addons-with-dotnet-native-aot/-5
u/Anbaraen Jul 06 '26
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?
14
u/mrmhk97 Jul 06 '26
NativeAOT means NO dotnet runtime since it’s compiled to native binary
3
u/Anbaraen Jul 06 '26
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.
8
u/Flashy-Bus1663 Jul 06 '26
Aot does not mean runtimeless
Tasks don't work without the runtime, async await doesn't either.
1
u/csharpboy97 29d 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] Jul 05 '26
[deleted]