3 ms·
I would go with a transpiler approach first (eg https://c2rust.com/ https://c2rust.com/) and then gradually transition pieces to use the Rust standard library a
by vlovich123 5y ago
I would go with a transpiler approach first (eg https://c2rust.com/ https://c2rust.com/) and then gradually transition pieces to use the Rust standard library and to safe code instead of the adhoc custom containers.
Still, that all would be predicated on having good Rust experience or using it as a learning experience and that may not be the motivation of the authors.
- pizza234 5y ago> gradually transition pieces to use the Rust standard library and to safe code Is this realistically possible on a non-trivial project? I suppose that porting to safe Rust requires a radical rearchitecture of the code.
- kitsunesoba 5y agoI have no experience converting a C or C++ project to Rust but have transitioned Objective-C projects to Swift and have found that even with Obj-C's newer additions to improve Swift interop, making the project as a whole safe is difficult until you've factored Obj-C out of all critical paths. It's just too easy for things to go wrong in the Obj-C half or in the Obj-C → Swift interop. So almost unavoidably you end up with two refactors: first, the piecemeal rewrite in the the safer language, and then a second when the original language has been rooted out and you can take advantage of all of the features of the new language.
- deleted 5y ago[deleted]