I think a Rust backend for Nim would be quite interesting. In my experience, 
I've found Rust is more like C than any other language, so I'm quite sure it 
would be possible.

There is already a C to Rust translator named 
[Corrode](https://github.com/jameysharp/corrode). It would be an interesting 
experiment to compile one's Nim code to C, then use Corrode to translate the C 
code to Rust. I suspect, however, that would simply implement the Nim garbage 
collector in Rust, rather than leverage Rust's borrow-checker, ownership, and 
lifetime features.

I suspect, if the stewards of Nim every wanted to add a Rust-like borrow 
checker to Nim, using Rust as a backend could potentially be part of the 
implementation. 

Reply via email to