crust
crust copied to clipboard
C/C++ to Rust transpiler
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...
[This line](https://github.com/NishanthSpShetty/crust/blob/f5bd4c76d0ca3b2e76fc285bb7d1c5e22fe02171/src/library/parser/mod.rs#L832) will cause a crash when `head` equals `lexeme.len()`: ```Rust stream.push(lexeme[head + 1].get_token_value()); //int f(int val) ``` ``` thread 'main' panicked at 'index out of bounds: the len is...
```cpp #include using namespace std; int main() { short a = 32767; short b = 32767; int c = a + b; cout
## C++ code ```cpp // /tmp/test1.cc struct simple { const char* hi; }; int main(void) { } ``` ## C++ compiler output ### g++ ```shell $ rm ./a.out; g++ --version;...
I attempted to convert a small main.cpp file and crusty dumped core: > [developer@devvm crust-master]$ cargo run > Finished dev [unoptimized + debuginfo] target(s) in 0.01s > Running `target/debug/crust` >...