https://github.com/lucaciucci/call-rust-from-fortran
Call Rust from Fortran
https://github.com/lucaciucci/call-rust-from-fortran
Last synced: about 2 months ago
JSON representation
Call Rust from Fortran
- Host: GitHub
- URL: https://github.com/lucaciucci/call-rust-from-fortran
- Owner: LucaCiucci
- License: mit
- Created: 2023-08-09T21:58:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-12T10:55:57.000Z (almost 2 years ago)
- Last Synced: 2025-03-25T15:52:42.845Z (3 months ago)
- Language: CMake
- Size: 43 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Call Rust from Fortran
This is an example project that shows how to call Rust from Fortran.
Project structure:
- [`src`](./src/) contains the Fortran source code and the equivalent C source code
- [`rust`](./rust/) contains the Rust source code
- [`CMakeLists.txt`](./CMakeLists.txt) is the CMake file that builds the project
- [`cmake/rust.cmake`](./cmake/rust.cmake) tells CMake how to build and link the Rust code## Build
To build the project, run the following commands:
```sh
mkdir build
cd build
cmake ..
cmake --build .
```
or just click your IDE's _build_ button.## Additional Material
- [Interoperability with C - GCC](https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gfortran/Interoperability-with-C.html)
## Call Fortran from Rust
See