News for hackers. Stuff that matters.
Re:Translating Quake 3 into Rust by masklinn on Tuesday January 07, 2020 @10:02AM (#21980513)
> I'm curious at how good c2rust is at producing idiomatic rust code.

It’s not. It should eventually improve but currently the goal is to

> build a rock-solid translator that gets people up and running in Rust.

Re:Translating Quake 3 into Rust by weberc2 on Tuesday January 07, 2020 @10:50AM (#21981059)
What is the ceiling for how good (i.e., "close to generating idiomatic Rust") it could get? Given the differing semantics, it seems like it should be nearly impossible to generate anything close to idiomatic Rust, but I know very little about mechanically translating between programming languages and I would be delighted to be incorrect.
Re:Translating Quake 3 into Rust by masklinn on Tuesday January 07, 2020 @11:05AM (#21981229)
I'd say "pretty low" on the idiomatic scale, however a very desirable thing would be for them to manage to make most of the generated code not unsafe. Limiting the scope of unsafe would make what would remain easier to convert to safe rust, and then you're off to the refactoring race with much more confidence.

A pretty good go would be the ability to recognise wide-spread high-level C patterns and be able to convert them to idiomatic Rust pattern, but even that would be difficult, generally speaking idiomatic C and Rust would likely be structured quite differently, especially on the data(-structure) side.