Stream: general

Topic: GOLang to RUST Re-engineering

Leonard Edwin (Nov 18 2019 at 18:37, on Zulip):

Hello, I have a large Blockchain CONSENSUS module written in GO that I would like to 're-engineer' to RUST code, only because I have very little RUST programming knowledge and experience. Is there a GO-RUST COMPILER or proven PROCESS to achieve the conversion of GOLang code into RUST? Many Thanks :)

Lokathor (Nov 18 2019 at 19:29, on Zulip):

I think that Go is a sufficiently complicated language that you'd need to do it by hand. Even the automatic C to Rust compiler isn't perfect.

Jake Goulding (Nov 18 2019 at 20:08, on Zulip):

You may also wish to re-evaluate when to use all-capital letters. Generally considered to be yelling when communicating online. It's correctly written as Go and Rust.

Leonard Edwin (Nov 18 2019 at 20:15, on Zulip):

Hi Everyone, thanks for your very valuable feedback ! @Lokathor I'd appreciate if you could point me to where/how I can evaluate the 'automatic C to Rust compiler' to become familiar with the process ...many Thanks :)

Lokathor (Nov 18 2019 at 20:16, on Zulip):

I'm not sure if there are other attempts

Yerkebulan Tulibergenov (Nov 18 2019 at 20:32, on Zulip):

Jake Goulding (Nov 18 2019 at 20:53, on Zulip):

Is there an automatic Go-to-C tool? You could hook both of them up to produce terrible output.

Jake Goulding (Nov 18 2019 at 20:53, on Zulip):

I wonder if you could compile to WASM and then disassemble...

Josh Triplett (Nov 20 2019 at 06:23, on Zulip):

Honestly, you're not going to get good results from any automated conversion. You're going to need to translate the code by hand.

Elichai Turkel (Feb 13 2020 at 10:57, on Zulip):

Yep. Most automatic conversions produce UB results.
As the invariants of unsafe rust are more strict than those of C

Last update: May 27 2020 at 22:50UTC