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


[Advertise on 4chan]


>the Rust standard library relies directly on glibc
rust sisters....how do we respond!
>>
>>110136339
everything running on a linux system relies on glibc i dont get what is surprising about this
>>
>>110136339
rust is a con. toolchain is too big for embedded, and the only reason it’s on the troonix kernel is because linus is a spineless boomer
>>
>use glibc or
>try to reimplement all that shit poorly instead (musl)
>only possible to avoid it on Linux anyway
I mean, what do you expect? If you're on Windows, you need MSVCRT or UCRT
If you're on apple, you need to link to libc
If you're on *bsd, you need to link to libc

relibc exists if you care.
>>
>>110136339
>Rust requires an Operating System to run and most of Linux code is in C
rust sisters... how do we respond!
>>
>>110136706
by making the future os (redox)
>>
>>110136765
>for a Rust application to connect to the Internet it requires sending the requests through several routers
rustsisters...
>>
a decent runtime cannot use foreign library (glibc). good C library also cannot rely on that. thats for #include <stdio.h> type of programs.

>>110136483
>you need MSVCRT or UCRT

nope

>If you're on apple

let apple to apple devs, its not OSS to discuss it, even.

>If you're on *bsd

that was a big surprize to me that frequently shilled openbsd here is hardcoded with this antique library, other bsd's not.

rust just have no grip to cosplay "system programming"
>>
>>110136339
Linker links your code with the libc. What's there not to understand?
>>
>>110136339
Jesus fucking christ, you fucking kidding me?
For some reason I totally took it for granted Rust didn't use that pozzed shit, and I commended it for that.
>>110136483
The base MSVCRT works on literally every version of Windows since Windows 95. The newer versions can be statically linked on installed as needed. You can't do those with glibshit. This is the most retarded design decision in GNU slash Linux.
>>
>>110136339
You can't just bootstrap Rust and ruststd without going through glibc and all the ancient versions of gcc first
But you can damn well try
>>
>>110137069
Linker links your code with whatever the compiler driver tells it to link with. Binutils doesn't know shit about libc except what the compiler tells it

>>110137093
Musl is pretty well supported. In fact it's what people mostly recommend for building statically linked binaries with rust
>>
>>110137154
Yes, I like MUSL quite a lot. I just assumed Rust shipped its own library or could at least link to musl.
>>
>>110136339
>You need a platform interface to compile against a platform
Wow
>>
I don't get it. Is there something about the Linux kernel interface that requires the code to look like a C function call? What does that even mean? Why can't Rust just have assembly wrappers for the right interrupts?
>>
>>110136339
>chatbot picrel
>doesn't know what a target triplet is
the non-technical word "relies" effectively leaked your tech-illiterate prompt, dumb retard.
>std for targets like "x86_64-linux-gnu" depend on glibc
wow! what a fucking discovery.
next, you're going to tell me "x86_64-linux-musl" depends on musl. and "x86_64-linux-relibc" depends on relibc (implemented in rust btw).
>but why depend on libc at all?
you don't have to. you can go no-std. and that choice doesn't mean you're letting go of EVERYTHING. in fact, most of what you associate with std is still available in lower level crates which std depends on and layers over. for example, you still have Vec, but you import it from the "alloc" crate instead of "std". it's the same type.
>but why depend on libc for std itself?
it's an implementation choice and detail, not an inherent requirement, where libc is used as a thin portable platform interface. it's not like rust std needs strcmp lol.
this implementation detail simplifies shit so you can for example simply depend on "libc::clock_gettime()" for all POSIX systems running on all architectures, instead of manually interfacing with syscalls from every platform, which would be effectively repeating what the libc implementation does anyway (in the case of relibc, using rust code).
-----
but of course, you didn't get a single word i wrote above. because, as already established, you're literally a tech illiterate chatbot tard.
why the likes of you feel the need to indulge in subjects they know nothing about? now that's a real mystery. it's definitely not because some (((people))) decided your tard self need to make it a part of your personality for some reason.
>>
File: gigachadnomorebikes.png (2.17 MB, 1536x1024)
2.17 MB PNG
>>110136339
I just started vibe coding my own programming language. It's damn near impossible to avoid the C runtime unless you want to write a fuckload of boilerplate on each OS and be incompatible with a bunch of shit and fight with operating system and binary compatibility.
>>
>>110137210
No, the Linux kernel uses syscalls directly, but that doesn't matter too much, the point is that the Linux kernel interface != glibc. Rust could provide its own low level kernel interface wrapper library or have an option to use another standard library.
>>
>>110137226
>strcmp lol

why a lol function needs a std bloat? dont bother. because rust designers are coo coo, hehehe

you guys are copycats cosplaying "rewriters"
>>
>rust sisters
just cuz u cut ur dick off and consume hrt doesn't make you a woman
>>
>>110137313
>a lol function

im rewriting some functions as purly inline, because they are lol-functions. thanks to clang directives they can be forced inline, not mumbo-jumbo inline as in other compilers or the spec itself. so those inlines are just put into body as assembly, no function call happens. it also has better (fixed) type tuning and other modern stuff. thats a rewrite.
>>
>>110137126
asterinas+clang+mrustc is all you need akshually. rust kernel, linux target. enjoy.
>>
>>110136483
Rust actually has a musl target as an alternative for users who want it.

>>110136706
Wrong. Rust doesn't require an OS to run, Rust's stdlib requires an OS. Same with C and C++. You can't do printf and malloc without an OS because these are functions that fundamentally involve making a system call.

To use Rust without an OS, you use libcore. To use C or C++ without an OS, you limit yourself to the freestanding headers.
>>
>>110137313
>the ~dude~god who thought "portable" meant having your program on a usb stick.. is opining
>>
>>110137210
You can do syscalls without glibc, but Rust wants more than syscalls. Specifically it wants malloc. Why not implement our own allocator? We did that before. It adds a little but of space to the binary, while malloc is free because it's in a dynamically linked library that's distributed on every Linux system.
>>
>>110137376
>Rust doesn't require an OS to run

kek, what a genius.. how do you run anything without an OS. are you one of those Rust core designers, hehehe

>you limit yourself to

no limits, in actuality, you can link and use another library that depends on libc. though, building a runtime such parts are marked and placed into trioxin container for later de-retardization from the libc
>>
>>110137400
>who thought

im still on portable thought. there are different layers, different kinds of "platforms". for somebody hardware is a platform, for somebody OS is a platform. now you own me $1 for education, fine is 100% an hour. time starts.
>>
File: RuntimeJeet.png (1.58 MB, 2048x2048)
1.58 MB PNG
>>110137400
>>110137492
>>110137515
The saaar is back, saars

>>110137400
desu link?
>>
>>110136339
RDS posters are not beating the no-coder allegations...
>>
>>110137804
>desu link?
https://desuarchive.org/g/thread/109076098/#q109083177
>>
>>110137492
>how do you run anything without an OS
Is that supposed to be a trick question? How does an OS run, without an OS to run on top of? How do many embedded applications run? You find out how a given device handles booting, you write a freestanding application for that device, and you implement for yourself anything an OS would provide for you. Rust is perfectly capable of doing all of this.
>>
>>110137419
rust trannies can’t even write their own internal heap allocator? binary space is a non-argument when we’re talking about rust, the god king language of bloated binaries
>>
>>110137804
>The saaar

its written theRuntimeGuy in there, retard, mine is hyphen cased god, not guy
>>
>>110137178
>or could at least link to musl.
It can.

>>110137419
This.
>>
File: 1792630355428771.gif (1.43 MB, 164x256)
1.43 MB GIF
>>110137226
you sound mad
>>
File: average-rust-developer.jpg (213 KB, 1296x730)
213 KB JPG
>You're glibc, you don't even know what the Rust standard library is
>>
>>110137093
>You can't do those with glibshit. This is the most retarded design decision in GNU slash Linux.
>she didn't fall for the install gentoo meme
portage literally solves that problem with slotting
>>
>>110138152
Can it statically link it too?
>>
>>110138513
if you couldn't even do
rustup component add rust-std-x86_64-unknown-linux-musl
cargo new test-musl
cd test-musl
cargo build --release --target=x86_64-unknown-linux-musl
ldd target/x86_64-unknown-linux-musl/release/test-musl

what are you doing in this thread?
>>
>>110137419
>malloc is free because it's in a dynamically linked library that's distributed on every Linux system.
So are coreutils but that hasn't stopped Rust people from rewriting them
>>
>>110136339
You can build it to use others.



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