Re:Compiling Rust for .NET, using only tea and stubbornness
by frankster on Tuesday August 29, 2023 @07:34AM
(#37306199)
I thougth to myself that surely there would be a CIL backend for LLVM, and why didn't the author just use it? But amazingly there doesn't seem to be.
[ Parent
| on HN ]
Re:Compiling Rust for .NET, using only tea and stubbornness
by ComputerGuru on Tuesday August 29, 2023 @01:03PM
(#37310782)
I personally would have been surprised to learn that such a thing existed! As a C# and rust developer who has hacked on llvm before, I have to admit that these two languages (and their underlying techs/stacks) are absolutely worlds apart and there is so little overlap between their communities.
I’d have been less surprised if there were a llvm backend for C#, but that wouldn’t exist without an IL LLVM target (because you’d be limited to the language without any (standard) library support.
The first-pass Roslyn compiler is really naive when it comes to optimizations; I constantly marvel at how little optimizations are performed in its first stages compared to what llvm does (the jit is amazingly well-tuned, however). An LLVM backend for C# would make for very interesting learning and research opportunities!
Re:Compiling Rust for .NET, using only tea and stubbornness
by tov_objorkin on Wednesday August 30, 2023 @07:34AM
(#37320464)
LLVM have MSIL translator back in 2007 [1], it was abandoned die to lack of interest.