Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ongchi/lagrit-bindings-rs
Rust bindings for LaGriT
https://github.com/ongchi/lagrit-bindings-rs
Last synced: 28 days ago
JSON representation
Rust bindings for LaGriT
- Host: GitHub
- URL: https://github.com/ongchi/lagrit-bindings-rs
- Owner: ongchi
- Created: 2024-12-01T14:20:18.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-01T14:29:21.000Z (about 1 month ago)
- Last Synced: 2024-12-01T15:29:48.645Z (about 1 month ago)
- Language: Python
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LaGriT Bindings
Rust bindings for [LaGriT](https://lagrit.lanl.gov/) (Los Alamos Grid Toolbox).
This crate provides both drop-in replacements for PyLaGriT and a Rust API for LaGriT.
# Installation
## From Source
### Prerequisites
- cmake
- gfortran
- gcc
- rust
- python### Clone from GitHub repository
```bash
git clone --recurse-submodules https://github.com/ongchi/lagrit-bindings-rs.git
``````bash
cd lagrit-bindings-rs/lagrti-sys/vendor/lagrit
./install-exodus.sh
# For MacOS
# ./MAC_install-exodus.sh
```### Build LaGriT Bindings
```bash
# (Optional) Change default linker to gcc on MacOS
export RUSTFLAGS="-C linker=gcc"
export CC=gcc
```then build the bindings.
```bash
cd lagrit-bindings-rs
maturin build --release
pip install target/wheels/lagrit_bindings-*.whl
pip install -r requirements.in
```### (Optional) Build with ExodusII support
```bash
cd lagrit-bindings-rs/lagrit-sys/vendor/lagrit
./install-exodus.sh
# For MasOS
# ./MAC_install-exodus.sh
```then build the bindings with exodus feature.
```bash
maturin build --release --features exodus
```