Why does Rust not have libraries?
>200MB of librariesLiterally never happens, but a retard nocoder like vaxry wouldn't know that.
>>107818973is that really how it works? i thought it still loaded a copy for each program for speed
>>107818998OS can optimize loading of shared libraries I think they would still be dupped in memory or maybe it uses some kimd of copy on write or something like that.
Static with LTO is superior. I want to run one video game faster not 8 video games faster.
>>107818973>Rust
>>107819013>copy on write>libraries
>>107818973this whole imaginary meme about the "OS optimizing shared libraries" is only true for core OS libraries such as kernel32 and user32 and so on. Any DLL that's used in an application which isn't an OS DLL is already going to be duplicated purely for compatibility reasons.Trying to share non-system libraries just isn't practical, and that's why Linux has such a DLL hell situation.
>>107818973If your "app" loads 200MB of anything just to start up, I will mail you a bomb. A zip bomb. In minecraft.
>>107818973>ram shortageI love how every retard suddenly wants to buy RAM all of a sudden... right during a price hike... as if they actually need it. Literally women toilet paper logic.
>>107818997>he doesn't know about %systemroot%\WinSxS
>>107818998>>107819013In the case of windows, there’s a bunch of shit in going on in the background to load the right version of the DLL, unless it’s already bundled with the application. I’m not that familiar with Windows on that front though, I’m just aware that they resolved “DLL hell” by allowing multiple versions of the same DLL to coexist, and they’re loaded some other way than just name. On Linux, it’s loaded by name, and libraries handle maintaining compatibility between major versions themselves.It also depends on whether it’s runtime loading, or compile time loading. In the former case you just get a handle to the loaded library and query the kernel for symbol locations. In the latter, the kernel will map the library into the specified address spaces in the executables linking info. No copies involved, it just makes not that when the program access X address range, remap the access into the real address space the library sits in. Any program using the library will be using the same code.
>>107819098t. Never played a video game
>>107818973>Why does Rust not have libraries?The rust compiler itself isn't even finished and stable yet, why would they have libraries too?Plus, rust operates like nodejs and other languages where you create a project and download everything into there and compile everything into one package, C libraries usually are shipped with the operating system, so they can be reused by everyone else.
>>107818973>>107819796Rust does have libraries. C and C++ people used to be against dynamic linking and shared libraries because UNIX only had static linking. Dynamic linking was something from mainframe operating systems and Windows that is against the UNIX philosophy. Plan 9 and Go people are still against it.https://doc.rust-lang.org/reference/linkage.html>--crate-type=dylib, #![crate_type = "dylib"] - A dynamic Rust library will be produced. This is different from the lib output type in that this forces dynamic library generation. The resulting dynamic library can be used as a dependency for other libraries and/or executables. This output type will create *.so files on Linux, *.dylib files on macOS, and *.dll files on Windows.
>>107818973i saw this posted inline a couple of days ago. and i thought it was just yet another /g/eet tard. i mean it was. but of course the content wasn't original. /g/eets can't do original.https://desuarchive.org/g/thread/107806865i mean, everyone has gaps in their knowledge. but being this clueless about static vs. dynamic linking is quite something.like, this doesn't even require trying rust. at least build your own shit statically and compare sizes for fucks sake. and get the realization that you only link what you need. at least know that very basic part of the equation. at least have some actual numbers to use as an anecdote. not even having an actual factual anecdote to base your fallacious brain deification on is quite something. it almost rivals /g/eeting.
>>107818973>200mb of libraries>rust has no librarieslmao. these losers can't even lie properly. this retarded faggot has no idea what he's talking about.>>107820612> but being this clueless about static vs. dynamic linking is quite something.welcome to 2026 where schizophrenic losers go onto cringe social media platforms and just lie about anything for attention.
>>107818973Naming a coding language after a form of decay probably wasn't the best decision.
>>107818973You can dynamically link whatever the hell you want.Does it really matter, though? Usually your program won't take gigabytes of RAM because you have some pages of code from a UI library mapped into RAM but because you're using a fucking web browser running JS to show your UI.Also, thanks to WinSxS, Flatpak and co, most programs that use dynamic linking just combine the downsides of dynamic and static linking for none of the upsides.
>>107820748it's a C is bad, rust is good shill post by a fucking moron that doesn't understand C or rust. i wish these larping losers of humanity would just fucking die already. they contribute absolutely nothing to humanity while truly believing they're a genius
>>107819925You almost never want dylib. You want cdylib. Rust doesn't really have a stable ABI so even Rust programs linking to your dylib will eventually break in unexpected ways.This sucks really bad of course because exposing a C ABI compatible library makes you lose most of Rust's benefits.And that's why almost every Rust library just links statically.
>>107820790>And that's why almost every Rust library just links statically.friend sent me his rust program that had a gui with text editor: 100mb. i can write the same thing using opengl and C, all statically linked: few hundred kilobytes for exe. rust trannies are literally insane and think 100mb for an exe is fine yet you can static link all day with c and not even get close to a fraction of that.
>>107819534No video game is going to share load assets with another video game in the way dynamic libraries do.
>>107820824>100mbSkill issue
>>107820824You don't get binaries that fuckhuge in Rust unless you're fucking retarded.If you associate with people like that, you must be retarded as well.
>>107820839>>107820840>rust tranny not coping very well with the shill thread gone wrong and people that know how this tranny language works won't stop slapping themlivestream suicide when?
>>107820847What?
>>107820853The guy's off his meds. He can't help himself.Nobody cares enough about him to make him take them.
>>107820736Just like github lol.
>>107818997>qt>boostngmi
>>107820864>rust tranny mental breakdown timeit's always great to see threads where chad programmers, that know how languages work, turn rust shill threads into a comical farce because rust tranny's are the most delusional and hilarious liars that can't even lie properly. couldn't lie straight in bed.
>>107819013cow pages are for forks. for mmaped files like libraries I think it's just many owners to the same files paged into memory. they both use the same concept of having the mmu show the same physical page to many virtual pages.
>>107820947Why do you really hate Rust? Rust is made by people with more C and C++ experience than you will ever have.
>>107820853Bak2skool.Lrn2read.
>>107818973>a ram shortageIt's not like they're taking the RAM right out of your computer. Yet...
>>107823694why wouldn't you resell your ram for 5x what you paid? i can do with no rust apps.
>>107820918All of Qt6 and Boost combined is 90 MB. your point?
>>107819205do you seriously use windows? LOL
>>107820947are you ok?
>>107818973wasn't that retard saying a while ago the "unused ram is wasted ram" meme due to its monitor background program loading every pape all at once?
>>107818973Rust and c++ have no stable ABI, making libraries cludgy.
>>107824102Why would you sell something you're using regularly? I mean I guess I can understand why if you're in such an unfortunate financial situation that you really need the money, but other than that people generally don't sell things they use.
>>107818973>caring about thisWhy? CoW is behavior you cannot rely on and can be a detrimate if your library has a lot of mutable state. Instagram wrote about how they had to tweak cpython so GC behavior wouldn't cause a massive blow up in memory when the pages get deduped in write. Just buy more fucking memory. Monomorphisation and LTO are better for performance anyway. >>107825250Well... C++ ABI is kind of a complex thing. Usually your std impl will have some stability in layout for types like array and vector and what not. It's not worth depending on, but some people do. C++ isn't a monolith like Rust.
>>107820824You can't statically link an UMD retard.
>>107824515>All of Qt6>90 MBlmao 90 MiB doesn't even cover qt6-webengine.. alone.. without dependencies
>>107820612Holy shit. That retard soundboards off /g/ before xitting his retardation to his fans?
>>107818973You can link dynamically in rust.Literally a non issue.
>>107819013It's complex. While that is possible, one problem you have to contend with is side-channels. Two distinct programs can bypass memory protection by using cross-process page dedup as a side-channel. Usually such dedup only happens on processes in the same process tree for this reason. Linux has some kernel "daemon" that can do whole memory dedup, by the way. It's a bit strange honestly.
>>107820790>Rust programs linking to your dylib will eventually break in unexpected ways.>implying it isn't also the case with CLol