Originally posted by moltonel
View Post
Announcement
Collapse
No announcement yet.
Mesa Developers Discuss The Possibility Of Rust Graphics Driver Code
Collapse
X
-
-
Originally posted by zxy_thf View PostIt is YOU who have ZERO KNOWLEDGE about how rust works.
Code:$ ldd `which rustc` linux-vdso.so.1 (0x00007fffe71cd000) librustc_driver-a65f53cf2e449c04.so => /lib64/librustc_driver-a65f53cf2e449c04.so (0x00007f4547f7e000) libstd-ce0075fa4a63cdc8.so => /lib64/libstd-ce0075fa4a63cdc8.so (0x00007f4547e7e000) libc.so.6 => /lib64/libc.so.6 (0x00007f4547cb4000) [B][COLOR=#e74c3c]libLLVM-10.so => /lib64/libLLVM-10.so (0x00007f4542f33000)[/COLOR][/B] libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f4542d43000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f4542d3c000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4542d18000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f4542cfd000) /lib64/ld-linux-x86-64.so.2 (0x00007f454bdb7000) libm.so.6 => /lib64/libm.so.6 (0x00007f4542bb7000) libffi.so.6 => /lib64/libffi.so.6 (0x00007f4542bac000) libedit.so.0 => /lib64/libedit.so.0 (0x00007f4542b6f000) libz.so.1 => /lib64/libz.so.1 (0x00007f4542b55000) libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f4542b24000)
LLVM is the ONLY back-end of rust compiler. This is COMMON SENSE.
Obviously the compiler depends on LLVM and not only that, for obvious reasons...
- Likes 3
Leave a comment:
-
Originally posted by kpedersen View PostFor example I don't think we will ever see a language i.e on a JVM that will be able to directly communicate with a language on a .NET VM.
Likewise for native languages, they all focus on C as the lowest common denominator. Which is why C is a very good bet.
Leave a comment:
-
Originally posted by polarathene View PostEh? A common pain point I've heard about with C++ is it's lack of interoperability with other languages.
It isn't C++ specifically that is bad at interop, it is that *every* high level language that isn't C is bad at interop with one another.
The fact that Rust can access some C++ types is fairly unique! But there are still a few areas where bindings will need to be made if needed.
For example I don't think we will ever see a language i.e on a JVM that will be able to directly communicate with a language on a .NET VM.
Likewise for native languages, they all focus on C as the lowest common denominator. Which is why C is a very good bet.
Leave a comment:
-
Originally posted by moltonel View PostThe direct Rust<->C++ interop solutions (without going through a C ABI) are actually pretty decent. Not every C++/Rust types can be used, but it's better than C<->C++ or C<->Rust interop. It's remarkable that Rust already has this, most languages don't bother and only implement a C ABI FFI.
Leave a comment:
-
Originally posted by jacob View Post
C++'s advantage for driver code is that it has a placement operator (rather crappy, but at least it has one) which Rust still doesn't and requires workarounds for that.
Leave a comment:
-
Originally posted by zxy_thf View PostYeah this is actually one of my major concerns.
I'm really relucant to be packed into the LLVM bandwagon
But anyway, there are attempts to wire up the existing rust compiler fronted with gcc as backend, so hopefully you'll be able to use rust without llvm one day.
- Likes 2
Leave a comment:
-
Originally posted by moltonel View Post
Moving from C to C++ isn't a no-brainer any more than moving from C to Rust is. C has a lot of problems, but it has served Mesa well so far, and adding any new language to a single-language project is a big ask. Adding two languages to the mix in one go is probably pushing it too far, so it makes sense to choose carefully.
C++ has more developers (especially if you put all C++ versions in the same bucket), it's well integrated with C build systems, has slightly wider platform support, and allows more niche code constructs. But compared to Rust it takes longer to become proficient with, it takes a lot more effort to secure, it has more linking/FFI issues, it has more platform-specific differences... It's a complex set of pros&cons, and rational people can reach opposite conclusions.
- Likes 1
Leave a comment:
-
Originally posted by Alliancemd View Post
You don't work on the compiler, you have absolutely nothing to do with LLVM. Rust binaries don't depend on LLVM.
Yet another example of somebody that has absolutely no idea what he is talking about but still decides to complain about it.
Code:$ ldd `which rustc` linux-vdso.so.1 (0x00007fffe71cd000) librustc_driver-a65f53cf2e449c04.so => /lib64/librustc_driver-a65f53cf2e449c04.so (0x00007f4547f7e000) libstd-ce0075fa4a63cdc8.so => /lib64/libstd-ce0075fa4a63cdc8.so (0x00007f4547e7e000) libc.so.6 => /lib64/libc.so.6 (0x00007f4547cb4000) [B][COLOR=#e74c3c]libLLVM-10.so => /lib64/libLLVM-10.so (0x00007f4542f33000)[/COLOR][/B] libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f4542d43000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f4542d3c000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4542d18000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f4542cfd000) /lib64/ld-linux-x86-64.so.2 (0x00007f454bdb7000) libm.so.6 => /lib64/libm.so.6 (0x00007f4542bb7000) libffi.so.6 => /lib64/libffi.so.6 (0x00007f4542bac000) libedit.so.0 => /lib64/libedit.so.0 (0x00007f4542b6f000) libz.so.1 => /lib64/libz.so.1 (0x00007f4542b55000) libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f4542b24000)
LLVM is the ONLY back-end of rust compiler. This is COMMON SENSE.
- Likes 2
Leave a comment:
Leave a comment: