Originally posted by moltonel
View Post
Announcement
Collapse
No announcement yet.
Mesa Developers Discuss The Possibility Of Rust Graphics Driver Code
Collapse
X
-
- Likes 1
-
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
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.
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.
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.
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.
Comment
-
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
Comment
-
Originally posted by moltonel View Post
Rereading the thread, there are also desires to use Rust in core parts like GLSL, although a driver is the pragmatic/cautious first step/experiment. Also, Mesa does use a bit of C++ already, though apparently there's still work needed to deal with the C/C++ impedance mismatch.
Comment
Comment