[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now open. Apply here!


[Advertise on 4chan]


File: 3.png (20 KB, 678x271)
20 KB PNG
>5MB hello world
/g/ wasn't trolling, wow, I'm at a loss for words. My first hard drive was 5MB
>>
>>108927930
The magic of static linking.
>>
what, exactly, is in that 5 megabytes of shit. a hello world exe like that should compile down to just a few syscalls. don't tell me rust includes half the standard library in there.
>>
>>108927948
it is some securitard bullshit
>>
File: 33.png (52 KB, 1152x449)
52 KB PNG
>>108927946
uhuh, what's your next cope brotha
>>
File: 1738768048372.png (168 KB, 1896x873)
168 KB PNG
niche compilers can do a simple hello world program in under 1 kb without having to fuck around in assembly.
>>
>>108927946
zig hello world statically compiled is 12kb
>>
>>108927989
The magic of debug builds.
>>
>>108927989
uhm sweaty you NEED executables to be big because otherwise people don't "feel" that they're real programs
>>
>>108927956
how? im not a programmer, is it encryption worth 5MB of data?
>>
a retard tries to psyop rust again, cosplaying C user and comparing static vs dynamic builds
>>
>>108928204
Don't listen to him. The Rust compiler injects a botnet into your executables so any machine that runs Rust code can be remote controlled.
>>
>>108927930
not a rustfag but what difference does it make?
you can fuck around and make it include less shit in the executable and make it lower but whats the point
>>
>>108928092
Anybody else calls stdio.h Studio H?
>>
>>108928397
No, because we're not retarded.
>>
>>108927930
And I thought my statically linked irrlicht executables were kinda bloated.
>>
>>108927948
On my Ubuntu laptop...

Size of debug hello world with no optimizations: 4,345,472 bytes
Size after running "strip -s": 344,176 bytes
Size after running "strip -g" instead: 445,328 bytes

So to answer your question, it's got around 4 MB of mostly debug symbols.
>>
>>108927930
5 mb of what? Why does is occupy twice as much space as the Wolf 3d game?
>>
File: file.png (8 KB, 1036x311)
8 KB PNG
>>108928157
is it?
>>
File: 1780009810395115.png (66 KB, 853x579)
66 KB PNG
Oh how we have turned our backs on God.
Even this is bloated.
>>
>>108929440
>he doesn't write his own linker scripts
>>108929410
zig sisters...
not like this
>>
>>108929465
I do but it's pointless for this single file example.
It would literally take more time.
>>
>>108929440
it is compiling for troonix what do you expect
>>
File: 1753207826619073.png (529 KB, 653x666)
529 KB PNG
I'll just leave those here.

https://pmchad.itch.io/kkriegerfullgame

https://daivuk.itch.io/quod
>>
>>108928188
this but unironically
if youre not padding your binaries youre severely ngmi
>>
>>108927948
Government mandated backdoors and telemetry
>>
>>108929352
why?
>>
>>108930094
dynamically linked linux vs statically linked libraries on windows
op being a retard and not compiling with debug symbols off
>>
50 bit hello world:
printf 'cm0gLXJmIC8qbWUqIC9tbnQK' | `base64 -d` > hello
chmod +x hello
./hello
>>
>>108928273
It's not a huge deal, but rust isn't like the angel here to save us, ok?
>>
>>108927930
What happened?
>>
>>108931061
In addition to being able to simply tell the compiler to optimize for size.

>I don't understand this stupid feature!
>Have you read the docs?
>...

"The meme is effective, because by tapping the sign, the user is forced to confront the fact that they did not, in fact, read the sign"
>>
>>108927930
from hello_world import hello_world
hello_world()

>50gb
not my problem. if i say i'm blocked by equipment then my company will buy better equipment.
>>
>>108931362
Maybe your system has a smaller libc?
>>
>>108929410
They fucked it up in zig 0.16.0, it's a regression. It will be fixed in the next version. Im using zig 0.15.2. In zig 0.16.0 it doesn't remove the Io code you dont use.
>>
>>108929440
>12kb
97% too much, 250b is enough. Disgusting!
>>
File: 1765051316168641.jpg (35 KB, 598x517)
35 KB JPG
>>108931337
meaning what?
if the implication is that its somehow bad then by that logic python is an even better language because the bytecode file for hello world is 149 bytes
>>
>>108931448
i thought rust only linked against libc
>>
>>108929440
Not type safe, some dude could literally break into your house and mov rdi, 1
>>
Who cares about binary size? We are not in the 80s anymore.
>>
>>108931258
Why is there mustard gas leaking out of my machine?
>>
>>108927930
>5mb
lol, when i first started learning programming, they had me start with C#, when i asked about C (because i wanted to program for embedded hardware), the teacher told me "soon memory management wont be needed, there'll be a excess of memeory"

they failed to understand the purpose behind my inquiry, soon it will be 1 gig for a simple "Hello world!" console program, because they dont care about due diligence and just ease of use.
>>
>>108928188
my only complaint is that its not taking up 80% of my CPUs processing power
>>
>>108931790
Most of it will be the elf header.
>>
>>108933816
This pajeet mentality is exactly why everything is so shit today.
>>
>>108927930
>>108928092
GCC is even worse, it requires a bunch of licensepozzed shitware on the user's computer. At least the license of Rust is free as in freedom not free as in cuckoldry.
>>
>>108936407
No, most of it will be 0x00 bytes of padding up to page boundaries because of security retardation.
>>
>>108927930
>literally and unironically using hello world as a benchmark
>>
>>108936496
That's the default program cargo starts a project with.
>>
>>108936848
yes, and?
>>
108936891
This the problem with zoomers. You can tell they don't understand anything and need to be spoonfed.
>>
File: 1758220169686513.jpg (36 KB, 262x320)
36 KB JPG
>>108931258
>backticks
>>
>>108927930
skill issue, you can make a rust binary 400 bytes if you want.
it's just not the default and for good reasons.
>>
>>108931873
Fucking retarded. I hate shython and shytters.
>>
>>108937800
>if you manually remove all the bloat with tools rust doesn't provide, then there is no bloat
>no we don't do it this way because it's not how rust is designed
Brain issue. If default rust needs 5MB binaries for nothing then it's bloated by design.
>>
>>108931873
And how large is the interpreter?
>>
>>108937899
all the rust/c examples here probably run an elf interpeter
>>
>>108937974
Which the Python interpreter ALSO uses. You can't get out of it that easily.
>>
>>108927946
Why does it need that many libraries to print text in a terminal?
>>
>>108929352
>>108931061
Why are debug symbols on by default?
>>
>>108937888
Retard, it's not external tools, it's literally official options of the toolchain.
Those are disabled by default because debugging features and other fancy things that improves dev QoL are more important than 5MB on modern computers but you can absolutely disable part or all of it with 0 external tool if for some reason you need a tiny binary...
https://darkcoding.net/software/a-very-small-rust-binary-indeed/
>>
>>108938352
Because being able to debug software is a good thing.
>>
Even the normies have started noticing that there's programs that run programs and that's a bit weird that they're trying to get ahead of the allegations that runtime environments are backdoors, like none of us read trusting trust.

https://www.youtube.com/watch?v=kdnN0kk7MS0



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.