-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I convert an entire folder of C/C++ files to Rust? #8
Comments
thanks for the comments @mczarnek , due to busy schedule I'm unable to address few of the issues in current implementation, but feel free to make changes and send PR. |
You can do this easily on linux using
etc |
Hm, the
|
That's a bug with the tokenizer, not with |
Thanks, but that one seems to only support c, not cpp. |
It uses the libclang backend, so it should support both C and C++ flawlessly. Give it a try! |
Unfortunately c2rust doesn't support modern rust versions as I have to use a version from 2019 😢
|
I've been looking at C2Rust a lot, I love that this one can handle C++ as well!! And that's it's written in Rust itself, meaning I don't have to download 3 or 4 external softwares so that C2Rust can use LLVM to do the actual conversion, and it doesn't even work on Windows. Seems like this one might also preserve comments. Awesome!! Don't have to mention,therefore advertising, C2Rust but please stress some of these things in your ReadMe.md
Anyway, one big issue I see those is that conversion has to be done on a file by file basis. Would be really nice and seems relatively easy to modify it to allow calling converting all c or cpp (and h) files in one folder to another folder recursively going through multiple levels and recreating those subfolders in the new folder.
One other thing to point out, C2Rust will transpile header declarations from any headers that are included so that the user can link the resulting Rust code against the same set of shared libraries as the C code did. Would be a nice feature to include.
Thanks for all the hard work!! Love this project and can't wait to play with it!!
The text was updated successfully, but these errors were encountered: