4 ms·
Which is exactly why I dont use any of those. I will stick to Go, or Rust, or Zig. People expect to be able to produce a single EXE. Maybe not as the default, b
by svnpenn 5y ago
Which is exactly why I dont use any of those. I will stick to Go, or Rust, or Zig. People expect to be able to produce a single EXE. Maybe not as the default, but it should be an option, and an easy option. Any language that cant do that is a failure in my opinion.
Also please dont lump interpreted languages with C#. At least with interpreted languages, once you have the runtime on your computer, you can have a single script file to work with. With C#, you STILL have to have the runtime on your computer, then after you "compile", youre left with a folder of one EXE and literally over 100 DLL.
- Dayshine 5y ago> With C#, you STILL have to have the runtime on your computer, then after you "compile", youre left with a folder of one EXE and literally over 100 DLL. No you don't. If you'd rather increase the download size for the user then you can turn on self-contained (include runtime) and single-file app.
- MikusR 5y agoThat single-file app is a zip archive with exe and those dlls
- mumblemumble 5y agoWith Python, if I publish my script with 100 dependencies, and someone `pip install`s it, they will also end up with 100 packages being copied to their computer. The main difference is that Python installs them globally (or at least thinks it does, if you're using virtual environments), while .NET apps isolate themselves from each other. Also, let's make a fair comparison. Is that hypothetical Rust application of yours depending on literally 100 crates? If so, what is the size of your binary?
- drunkpotato 5y agoPlease don't use Python package management as a baseline. Aim higher. I love Python, but I cringe whenever someone asks me why a Python program isn't running properly on their machine. Obligatory xkcd: https://xkcd.com/1987/ https://xkcd.com/1987/
- sdwr 5y agoFunny how feelings change. https://xkcd.com/353/ https://xkcd.com/353/
- AdrianB1 5y agoTake PHP with composer: it works quite fine, but still you need all the dependencies downloaded from somewhere on Internet. Just a PHP script and the PHP interpreter works, but this is not how 99.9% of the software is written.
- kilburn 5y agoThe php world invented the phar format [1] to deal with the single file tool/app distribution issue. In fact, composer uses dependencies managed by itself in their sources. Then it gets packaged and distributed as a single file that includes all dependencies (composer.phar). That single file can be run by php as if it was any regular php file (including executing it directly and letting your system detect the required interpreter through the shebang). https://www.php.net/manual/en/intro.phar.php https://www.php.net/manual/en/intro.phar.php
- AdrianB1 5y agoSelf quote: this is not how most apps are written.
- pjc50 5y ago> At least with interpreted languages, once you have the runtime on your computer, you can have a single script file to work with. The Python people stuck in venv hell would probably think otherwise.
- Gluber 5y agoIf 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