Simple example of how to call functions written in Rust from C code. Literally the "Hello World!".
This code is part of my blog post.
cargo build --release
gcc -o crust ./src/crust.c -Isrc -L. -l:target/release/libcrust.so
./crust
Simple example of how to call functions written in Rust from C code. Literally the "Hello World!".
This code is part of my blog post.
cargo build --release
gcc -o crust ./src/crust.c -Isrc -L. -l:target/release/libcrust.so
./crust