Calling C from Rust
Posted on by Rust on Julia Evans
Yesterday I asked Kamal how to call C code from Rust, for a project I’m thinking about. It turned out to be a little harder than I expected! Largely because I don’t know Rust well, and fixing compiler errors is nontrivial. 30 minutes and some number of inscrutable-to-me compiler errors later, we figured it out. I want to do something pretty simple – copy the string “Hello, world!” and print it.