|
|
|
|
|
by Gluber
1648 days ago
|
|
If we're talking modern .NET ( 6 for example ) you have 4 options,
let's assume a simple hello world without third party dependencies: 1. Build it runtime dependent: ( which requires the NET 6 runtime to be pre installed ) on your computer in order to be able to run:
You get a single exe file. 2. Build it self contained: You get a directory with a bunch of dlls and one exe
But no runtime needs to be installed on the target computer 3. Build it self contained + single exe: You a get a single exe that embeds all those dlls and unpacks them in memory ( since net 6, in net 5 it would copy them to a temp directory ) 4. Build it using AOT Mode: You get a single, statically linked exe.
This is probably the closest to a standard Rust (statically linked) build.
However AOT mode is not yet official and requires some fiddling still, but should become stable for NET 7 next year.
And you loose out on some features obviously like runtime code generation |
|