Call Rust from Fortran
August 12, 2023 ยท View on GitHub
This is an example project that shows how to call Rust from Fortran.
Project structure:
srccontains the Fortran source code and the equivalent C source coderustcontains the Rust source codeCMakeLists.txtis the CMake file that builds the projectcmake/rust.cmaketells CMake how to build and link the Rust code
Build
To build the project, run the following commands:
mkdir build
cd build
cmake ..
cmake --build .
or just click your IDE's build button.