- Compiles c++ to Rust
- Compiles c++ to Php (Not yet)
Because I had no other choice.
# node main.js <file>.cpp# compiles main.cpp to main.rs
node main.js main.cpp
# compiles main.cpp to main.asm# run node main.js --target list for valid targets
node main.js main.cpp --target x86_64-fasm-linux-gnu
# for more details
node main.js --helpBuild main.rs and run
make build-rs
make runBuild main.asm and run
make build-fasm
make run-fasm# rustc <file>.rs -o <file>.out
rustc main.rs -o main.out//commentsprintf("...");it doesn't support more arguments (printf("%d", 10)doesn't work)return
#include<cstdio>intmain()
{
// This is commentprintf("Hello from c++\n");
return0;
}