rebound-bind
Low-level Rust FFI bindings for the REBOUND N-body simulation C library.
Requirements
Building this crate requires:
- A C compiler
libclangand Clang headers forbindgen- The
reboundsubmodule checked out
If you cloned this repository without submodules, initialize them first:
Some optional features require additional system libraries.
Features
No features are enabled by default.
Available features:
server: enable REBOUND server supportopengl: enable OpenGL display support; requires GLFWopenmp: enable OpenMP supportopenmp-clang: enable OpenMP support for Clang/libomp setups, commonly needed on macOS with Homebrewlibompmpi: enable MPI support; requires an MPI compiler and headersfftw: enable FFTW support; requires FFTW3avx512: enable AVX512 supportquadrupole: enable quadrupole supportprofiling: enable profiling support
Example:
Build notes
The build script compiles the C sources from rebound/src directly with the cc crate and generates Rust bindings from rebound/src/rebound.h with bindgen.
The source file list and compile flags are aligned with REBOUND 5.0.0's src/Makefile and src/Makefile.defs.
License
This crate is licensed under GPL-3.0 and includes vendored REBOUND sources under the same license family. See rebound/LICENSE for the upstream license text.