This is a sample repository to show how to use a .dll / .so shared library generated from Rust. This example focus only on how the generation, usage and linking works.
If you're using the GNU make utility, you may just run make
This should create the rust library and futher create the C executable.
rustc libcalc.rs --crate-type="dylib"
gcc main.c -o main.exe libcalc.dll
λ .\main
Calculating from rust...
Result: 15