This is really neat, I always wanted to see other languages target .NET much like the JVM was a popular platform to target. Considering .NET is fully MIT licensed I am surprised we dont see more languages that target .NET
Rust panics under the hood, and implementing them in .NET
21–30 of 83 posts
Re: Rust panics under the hood, and implementing them in .NET
#22This is really neat, I always wanted to see other languages target .NET much like the JVM was a popular platform to target. Considering .NET is fully MIT licensed I am surprised we dont see more languages that target .NET
The lack of a debugger (except for Microsoft's propriety one in VS Code) probably limits the language a bit on open source operating systems.
Re: Rust panics under the hood, and implementing them in .NET
#23Earlier quoted context omitted.
.net considers the rust code "unsafe" so you can do unmanaged, non-GC stuff in the Rust portion of the code.
You can already do that from .NET itself. My question here is more along the lines of: "what Rust libs are out there that I might be interested in from .NET?"
I imagine this pattern will become more common for fat clients where it is desirable have a single implementation with idiomatic language bindings.
Re: Rust panics under the hood, and implementing them in .NET
#24This is really neat, I always wanted to see other languages target .NET much like the JVM was a popular platform to target. Considering .NET is fully MIT licensed I am surprised we dont see more languages that target .NET
Microsoft didn’t manage to have Visual Basic target .NET without turning its semantics into C# with different syntax, so this will be interesting to see.
Re: Rust panics under the hood, and implementing them in .NET
#25Earlier quoted context omitted.
.net considers the rust code "unsafe" so you can do unmanaged, non-GC stuff in the Rust portion of the code.
You can already do that from .NET itself. My question here is more along the lines of: "what Rust libs are out there that I might be interested in from .NET?"
Re: Rust panics under the hood, and implementing them in .NET
#26I'm using nostd and panic=abort to keep the library small (around 200kb after being stripped), but it's really not a well-supported setup.
Depending on the platform, I get an error that the _Unwind_Resume symbol is not defined (despite it not supposed to be needed), or if I define it myself I get a duplicate symbol error on other platforms. I ended up linking to gcc_eh on Linux just to avoid the issue.
I just find it strange that out of all the possible issues with using nostd, unwinding is causing the most issues.
Re: Rust panics under the hood, and implementing them in .NET
#27Earlier quoted context omitted.
The lack of a debugger (except for Microsoft's propriety one in VS Code) probably limits the language a bit on open source operating systems.
What does Rider use? I assume it's not a proprietary MS one? Or did they license it?
In general, the debugger is not intentionally made unavailable but rather the "properietary" one is just the original Visual Studio debugger extracted into a standalone package adapted to cross-platform.
Other than that, CoreCLR exposes rich debugger API, and debugger implementations just integrate with it, there are no "private bits" that would make this task insurmountable, there was just not much need to do so so far, and some Linux folks (as evidenced by skimming through other .NET submissions here) tend to have irrational and unsubstantiated hatred towards .NET which hinders otherwise positive community efforts.
Re: Rust panics under the hood, and implementing them in .NET
#28Earlier quoted context omitted.
AFAIK, the IJW bits of the CLR are exclusive to Windows.
And strongly in a "do not use unless you must" category too.
Pity that never made the cross platform jump.
Re: Rust panics under the hood, and implementing them in .NET
#29In the past I have worked on Solidity -> Rust compiler, to enable Solidity on WASM VMs. My pain point was emulation of C3 inheritence in Rust, which I actually was able to implement with a few macros. In Rust -> .NET I'm interested in how he does the `DerefMut` trait.
What do you mean by that? A compiler backend isn't even exposed to high level concepts like traits.
Re: Rust panics under the hood, and implementing them in .NET
#30Earlier quoted context omitted.
In theory, the compiler could do the same as C++/CLI, and output safe Assemblies when specific code patterns aren't used.
AFAIK, the IJW bits of the CLR are exclusive to Windows.
Likewise the whole WinRT/UWP, .NET Native and C++/CX, were under WinDev umbrella, not DevDiv.
Which is why there is this schizophrenic way of how .NET is currently handled on Windows desktop.