[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


>>
>>108924540
Looks like a lot of cargo went overboard
>>
>>108924540
>431kB for two lines
>>
Having to mark functions as functions is retarded
>>
>>108924540
>point and laugh
>>
>>108924540
>>108924600
It's the upfront cost of loading their stdlib. Four lines won't result in a 862kB binary.
>>
>main function explicitly marked as function
>random exclamation mark
>braces
>semicolon
>empty parentheses
Is this the so called ”modern” language?
>>
>>108924540
>how do you respond without sounding mad?
sure.

rustup toolchain add 1.75
cargo +1.75 new hw
cd hw
cargo +1.75 build
cargo +1.75 build --release


% du -h target/{debug,release}/hw
4.3M target/debug/hw
4.3M target/release/hw


echo '\n[profile.release]\nstrip = "debuginfo"' >> Cargo.toml
cargo +1.75 build --release


% du -h target/release/hw
416K target/release/hw


rm -rf target
RUSTFLAGS="-C prefer-dynamic" cargo build --release


% du -h --apparent-size target/release/hw
6.7K target/release/hw


# bonus
strip --strip-all target/release/hw
% du -h --apparent-size target/release/hw
5.0K target/release/hw


now, when are you, or whatever retarded shitters you copy this shit off, going to actually code something non-trivial and show it, in any language whatsoever, instead of measuring "hw size", and continuing to be the village idiot content(adj) in their happy place they mistake for the real world?
>>
>>108924758

the goal was to respond without sounding mad.
>>
>>108924715
The random exclamation mark is because println is a macro rather than a function in rust.
Because the trannies still haven't figured out variadic functions.
>>
>>108924643
Still way too much
>>
File: Rust_Sucks.png (179 KB, 1027x1342)
179 KB PNG
>>108924813
>>
>>108924813
variadic functions are obsolete trash that has literally no reason to exist and the existence of variadic function pollutes every popular calling convention on earth
the Rust solution of using a compile-time-evaluated macro is unironically better and no, I'm not a rust troon, I don't know how or want to use Rust, and I prefer C over any other language.
>>
>>108924758
>static link by default in 2026
>>
>>108924540
This and more was always achievable with the proper flags. I guess they just changed the default.
This was always a non-argument that only the most retarded Cniles made.
>>
>>108924540
C is 16KiB
>>
>>108924807
where are the goalposts? i can't see them
>>
>>108924915
it doesn't matter for most cases.
>>
File: 1738768048372.png (168 KB, 1896x873)
168 KB PNG
>>108924758
>>108925055
it's 2026 bro, we can go below 1 kilobit.
>>
Is /g/ just the same reheated garbage every single day? At least other popular boards move the fuck on. I have shit on Windows written in rust and the compiler output is small and fine. Literally under 1MiB. Most bloating will always be static linking and it's a literal non-issue. Some of the most bloated Rust programs I wrote are still usually under 10MiB. Stop being gay and retarded and move on.

I'm guessing the difference in 1.75 and 1.94 is also just better elimination of unused stdlib stuff since the compiler is generally shipped with std crate being prebuilt.
>>
>>108925422
>Is /g/ just the same reheated garbage every single day?
You're only now realising this?
>>
>>108924540
But I am mad, you should be mad.
>>
>>108925400
Rust is great for retards and storage is cheap... wait...
>>
>>108925476
>storage is cheap
This used to be an argument. Sad!
>>
>>108925400
ya cool but ur third image isnt a practical language, it is intersting but C will never fully disappear thats why i use it
>>
File: rust wins.jpg (587 KB, 4436x1876)
587 KB JPG
>>108925400
fake news
>>
>>108924600
uhm it's three lines ackchyually
>>
>>108924758
>op absolutely destroyed
nice

>>108924941
cope
>>
>>108924540
It's getting better with each newer version?
>>
>>108925678
better? no. still bloated but not as much.
>>
>>108924540
that's cool
I'm more interested in that the crabs are finally stabilizing Allocator
https://github.com/rust-lang/rust/pull/156882
>>
>>108925400
https://desuarchive.org/g/thread/104222886/#q104223679
have you done anything actually useful in that year that passed?
>>
>>108924540
so they changed the default linking behavior so what?
>>
>>108925869
wrong
>>
>>108925764
It's good that they actually reached out to people and actually extensively bikeshedded it. I know people seethe about the speed, but I think they're doing the right thing.
>>
>>108925496
That was the joke.
>>
File: 1779791693773610.jpg (307 KB, 720x720)
307 KB JPG
>>108925827
oh wow, anons remember me. 2025 was the big year when i decided to turn my life around. i got on antidepressants, went to speed dating events and applied to all the cool software companies. the result? i got bald, fatter, ghosted and denied job offers and still haven't had my first girlfriend yet. the good news is returns from the stock market.

>>>/wsg/6159956
>>
>>108925594
what the actual fuck is this syntax
even pascal mogs your ass
>>
>>108926213
well deserved for being a phasecuck
>>
>>108926213
Sounds like you need to kill yourself immediately. Such is the fate of all schizophrenics.
>>
File: 1773698454332593.png (237 KB, 736x735)
237 KB PNG
>>108926346
>>108926379
psychiatrist said i have obvious signs of autism (nothing life threatening)
>>
>>108926420
Nah you're a full-blown schizophrenic. And it is life-threatening because I'm coming to kill you.
>>
>>108926420
Schizo retard. Fuck you.
>>
>>108926420
I don't care if you have an AR-15
>>
>>108924540
HOW IS TWO FUCKING LINES 431KB????????
>>
My face burns
>>
>>108926541
see >>108925594
>>
>>108925594
>14kib
Why?
>>
>>108926608
idk, idc
>>
>respond
What's the question?
>>
>>108924540
>println!
>!
Why though
>>
>>108926637
That indicates its a macro and in this case its a macro because it takes an arbitrary number of params
>>
I'm gonna puke
>>
>>108926420
>Brown Reimu
Cute
>>
>>108926662
it'a a macro because it's defined as a macro. and i would consider ref-ing the passed expressions more relevant than "vararg"-ness.

e.g.
fn main() {
let s = String::from("world");
println!("Hello, {}", s);
// s not moved above
println!("Hello, {}", s+"!");
}


if fomat_args!{} (the important macro println!{} uses in it's expansion) wasn't a compiler-builtin, one could imagine a function like
fn format_args<const N: usize>(fmt_str: &static str, args: [&dyn Printable; N]) -> Formatted

then downcast `Printable` to `Display` or `Debug` or whatever. But this would also lose some compile-time guarantees (another reason for going with a compiler built-in macro), but the number of arguments itself being variable is not a problem (in post-"const generics" Rust), unless it's an "ergonomics" argument.
>>
main(){
puts("Hello world !");
}
>>
>>108926910
I understand why rustroons kill themselves, I would too if I had to deal with this every day
>>
File: vfprintf.jpg (3.24 MB, 3192x9601)
3.24 MB JPG
>>108927165
>>
>>108927171
Your point being? This is 1000x more readable than a single line of rust code
>>
>>108927165
Why would they? format! mogs both C and C++s shitty string formatters.
>>
>>108927171
you fucking monster.
what's next?
informing /our/ /g/ nocoders that va_start, va_arg, and va_end are actually macros too?
>>
>>108926910
you can also do neat shit like
"Hello, {s}" as well.

you can't do that in C++23 <format> either, which they basically stole this from.
don't @ me about streams. anyone who's used them knows they suck.
>>
>>108924581
400kb of pure security, you can fit 3 hello worlds in a floppy disk!!!, amiga demoscene grandpas are rolling in their graves
>>
>>108925359
It should

>>108925605
Ok nevermind guys I got btfod
>>
>>108925400
If Wisnia was actually useful for something, everyone would be using it already.
>>
>>108929087
just 2 more weeks, bro
>>
>>108924941
A large amount of the functions in the rust stdlib are generic, and thus could not be dynamically linked anyways.
>>
File: hello_world_rust.png (263 KB, 1035x1936)
263 KB PNG
>>108924540



[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.