But it's _not_ c2rust. It started that way but this approach was abandoned in favor of a manual port.
From the comment you replied to:
> The decision to throw it all away and do a manual port, while surely gut-wrenching, was the right call. You just can't automatically translate the intent of the original C code into safe, idiomatic Rust.
From the second paragraph of TFA:
> I threw away all of the C2Rust output and decided I would translate all of the files into Rust manually from C.
Please at least read the source before shit-talking it.
I usually don't comment because I am fine with reading stuff on here during my breaks and don't engage in discussions.
Your poo-pooing of a hobby project that has no ambitions of being enterprise grade really rubbed me the wrong way though.
If it brings you joy to call me a bot, go ahead though.
Everyone's gotta start some time. My first comment wasn't until almost exactly a year after I finally made an account (according to search, but that lines up with my memory), and I didn't even create an account until I had been reading for a couple years IIRC.
I think it's often people that have an emotional response that make their first comment if they've been a lurker for a while already.
FWIW I think people are reacting negatively to you is because you've done the equivalent of walk into a community center where someone is showing their hobbyist art project and loudly proclaimed all the problems and that you'll be more interested when they fixed it up enough to make it to a real gallery. Not only is that person missing much of the point of why that person did it and judging it by standards it was never intending to strive for, but doing so around others that are there to appreciate it for what it is actually hampers their enjoyment and the empathic happiness they feel for someone striving to do something for the fun of it.
In other words, most people don't really care if this materializes as an actual product or project that's widely usable. It's a cool hobby project and some of us appreciate that, and appreciate people documenting their process in doing such things.
Thanks for the explanation. However, do you think that the author is going to learn Rust this way? You should honestly check out the source code. I do not think that this is in any way educational if the aim is to learn Rust. Maybe the aim is not that, but then why Rust? It could have been done in Forth, too.
You are right, it is very far off from idiomatic Rust. It could have been done in virtually any programming languages. I am not sure why Rust was chosen if they decided to go against everything Rust stands for.
This is how a lot of rewrite projects start out, particularly in the hobby space. They focus on a 1:1 translation between the two languages until they're able to drop the original language's dependencies (compiler, etc). Then from there you start translating into idiomatic rust.
I have never seen rewrite projects start out this way. What is the point of the rewrite then, if this is 1:1? You will definitely implement bugs, too, and most likely introduce more.
Any ship of theseus rewrite is going to introduce bugs in the process, either by translating it 1:1 first or by replacing code with rust and talking over FFI.
The appeal of translating to rust first is that 1. you intimately learn a codebase you did not write, 2. you can refactor code during the following stages of the rewrite without worrying about FFI boundaries (which are their own massive source of complexity), and 3. you can work entirely in an ecosystem you prefer rather than attempting to work with tooling across ecosystems.
I personally prefer this 1:1 approach for hobby projects (where notably you don't have to continue maintaining a working product while the rewrite is in progress) because you can refactor in passes rather than in sections but it does have it's own drawbacks (added bugs/changed behavior from translation, etc) that you have to compensate for with additional tooling (like fuzz testing, conformance testing, etc).
From the second paragraph of TFA: > I threw away all of the C2Rust output and decided I would translate all of the files into Rust manually from C.
Please at least read the source before shit-talking it.