epanet-sys
Raw FFI bindings to the EPANET 2.3 C library for water distribution network modeling and simulation.
The EPANET source is included as a git submodule and compiled via CMake at build time. Rust bindings are generated by bindgen.
If you want a safe, idiomatic Rust API, use the rusty-epanet crate instead.
Prerequisites
- CMake and a C compiler (MSVC on Windows, GCC/Clang on Linux/macOS)
- libclang (for bindgen)
Usage
[]
= "2.3"
All EPANET C API functions are available as unsafe extern functions:
use *;
unsafe
Linking
By default the EPANET C library is statically linked into your binary.
To use dynamic linking instead:
[]
= { = "2.3", = false, = ["dynamic-link"] }
Versioning
The crate version tracks the EPANET C library version (2.3.x).
License
MIT