Live data from Hacker News

Rust to C compiler – 95.9% test pass rate, odd platforms

fractalfir.github.io

21–30 of 264 posts

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#22
post #5
post #4

I'm not convinced that it’s worth spending any time supporting most proprietary systems. Maybe not even Windows, but especially the really expensive ones.

You shouldn't spend your own effort; you should make it clear that you're open to users of such systems contributing. That's how GCC became so dominant - there were people already using all sorts of Unixen and they wanted a compiler, so they made it work.

That is absolutely true but exotic platforms are also fun to investigate and you can learn a lot. So I'd say you shouldn't spend your own effort if you don't want to but I am glad fractalfir did and I am looking forward to the his RustWeekNL presentation.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#23
post #5
post #4

I'm not convinced that it’s worth spending any time supporting most proprietary systems. Maybe not even Windows, but especially the really expensive ones.

You shouldn't spend your own effort; you should make it clear that you're open to users of such systems contributing. That's how GCC became so dominant - there were people already using all sorts of Unixen and they wanted a compiler, so they made it work.

Of course, accepting contributions comes with some effort, too.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#25

How is this not dangerous? How can one be assured that all of the compile-time safety features of the Rust compiler are still in effect? Handwaving does not help.

How does the rust compiler assure that when compiling to machine code? Machine code is less safe than C after all.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#26
post #5
post #4

I'm not convinced that it’s worth spending any time supporting most proprietary systems. Maybe not even Windows, but especially the really expensive ones.

You shouldn't spend your own effort; you should make it clear that you're open to users of such systems contributing. That's how GCC became so dominant - there were people already using all sorts of Unixen and they wanted a compiler, so they made it work.

> You shouldn't spend your own effort; you should make it clear that you're open to users of such systems contributing.

In practice you can't really draw a line between those two things.

I don't know the end result, but I remember a discussion of how implementing parts of Git in Rust would be a problem because NonStop, a currently supported platform, has no Rust support. Of course the sane response would be "screw NonStop then", but having accepted contributions to make NonStop a supported platform that isn't an easy path to take.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#27
post #25

How is this not dangerous? How can one be assured that all of the compile-time safety features of the Rust compiler are still in effect? Handwaving does not help.

How does the rust compiler assure that when compiling to machine code? Machine code is less safe than C after all.

Machine code is generally much safer than C - e.g. it usually lacks undefined behaviour. If you're unsure about how a given piece of machine code behaves, it's usually sufficient to test it empirically.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#28

How is this not dangerous? How can one be assured that all of the compile-time safety features of the Rust compiler are still in effect? Handwaving does not help.

How can one be assured that all of the compile-time safety features of Java are is still in effect in bytecode?

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#29
post #24

Very cool. C to Rust would be fantastic.

Mark Russinovich recently gave a talk at a UK Rust conference that mentioned Microsoft's internal attempts at large scale C->Rust translation, https://www.youtube.com/watch?v=1VgptLwP588

Note the AI part of the tooling.
Post reply on HN