Earlier quoted context omitted.
I have 13043 .exe files on this computer, at 90MB a piece that would be 1TB.
If most executables on your machine used Bun, then it would be a bundled shared library on your system eliminating the bulk of the 90mb executable size. Just like the shared libraries the 13043 .exe files on your computer are currently linking to.
Bun 0.6
211–220 of 243 posts
Re: Bun 0.6
#212Re: Bun 0.6
#213Earlier quoted context omitted.
yeah 90MB for a hello world is big. Approximately 2,700 times bigger than it could be.
I got 4Gigs on my phone and 4x that on my laptop. I don't care about 90megs. What's the point in looking at size ? I can see two: - want to email the exe, and you have limits on mail size - want to be ecofriendly, in that case stop watching netflix for 2 hours and you'll have your megs
Re: Bun 0.6
#214Earlier quoted context omitted.
> but produces native code similar to compiling C. That's very misleading. For one, Java running native still needs a Garbage Collector, maintains Object headers which increase memory usage, can do things like reflection for configured classes, can load services via the ServiceLoader, schedule Threads and manage executors, and many other things that are "expected" to any Java application... in summary: native executa…
It also misleading to think C doesn't have a runtime. https://learn.microsoft.com/en-us/cpp/c-runtime-library/c-ru... https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_... And many more, not feeling like linking documentation from all C compilers. In fact this is so relevant even for C, that ISO C has a special section for deployments without runtime support…
From your link:
"Most of the routines in libgcc handle arithmetic operations that the target processor cannot perform directly."
You're trying to imply the Java native runtime is comparable to liggcc?? That's silly.
Re: Bun 0.6
#215Earlier quoted context omitted.
A native Java "Hello World" can be around 8MB in size.[1] So, yes, 90MB is too much. 1. https://sergiomartinrubio.com/articles/getting-started-with-...
“The generated file is 7.7MB, which is quite impressive for a Java application since this executable does need a JVM.” I assume this is a typo and they mean “does NOT”?
Re: Bun 0.6
#216Earlier quoted context omitted.
Is the JVM inside that 8MB then I guess? That is pretty great. Originally I thought the alternative was “8MB but supply your own virtual machine.”
There's no JVM when using GraalVM Native Images, it relies on a JVM during the compile step (well, specifically GraalVM), but produces native code similar to compiling C. There's no virtual machine running bytecode, just entirely native code. So the size of the executable will depend on how many features of the JVM you need compiled into your executable. A pure java bytecode (bring-your-own-JVM) Hello World can be un…
Re: Bun 0.6
#217Earlier quoted context omitted.
It doesn't HAVE to be that bulky or complex. You have a lighter space like Dokku or just direct scripted deployments pretty easily. As to the size, you can use debian-slim or alpine as a base for smaller options. There's also bare containers, or close to bare for some languages and platforms as well (go in particular).
What's even "lighter" is a single binary sitting in /home/app running under "app" user and launched by systemd unit file with auto restart. Look, I totally get the unholy hell that's (for example) python dependency management, and containers are a great solve for that. Sometimes you don't have a choice of technology, so I get it. What I don't understand is folks that use containers for stuff like go binaries. Or node…
With Python it's just "venv/bin/pip install -r requirements.txt".
All the tools needed to create an isolated environment (venv) and install packages (pip) come with the standard Python distribution these days. I wouldn't characterize that as "unholy hell".
Re: Bun 0.6
#218Earlier quoted context omitted.
A native Java "Hello World" can be around 8MB in size.[1] So, yes, 90MB is too much. 1. https://sergiomartinrubio.com/articles/getting-started-with-...
I feel like using Graal for the comparison is cheating a bit because it's so fundamentally different from what bun is doing. You need to compare it to tools that ship class files and a JVM, or something like PyInstaller which will have much much more overhead.
Re: Bun 0.6
#219Earlier quoted context omitted.
It also misleading to think C doesn't have a runtime. https://learn.microsoft.com/en-us/cpp/c-runtime-library/c-ru... https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_... And many more, not feeling like linking documentation from all C compilers. In fact this is so relevant even for C, that ISO C has a special section for deployments without runtime support…
That's not at all comparable. From your link: "Most of the routines in libgcc handle arithmetic operations that the target processor cannot perform directly." You're trying to imply the Java native runtime is comparable to liggcc?? That's silly.
Re: Bun 0.6
#220Earlier quoted context omitted.
Yeah but no one distributes hello world.
If the base line is 90MB, then it only goes up from there.