| Crates.io | cfsem |
| lib.rs | cfsem |
| version | 2.5.0 |
| created_at | 2024-07-09 21:01:01.062435+00 |
| updated_at | 2025-08-14 12:24:43.507899+00 |
| description | Quasi-steady electromagnetics including filamentized approximations, Biot-Savart, and Grad-Shafranov. |
| homepage | https://github.com/cfs-energy/cfsem-py |
| repository | https://github.com/cfs-energy/cfsem-py |
| max_upload_size | |
| id | 1297477 |
| size | 844,844 |
Quasi-steady electromagnetics including filamentized approximations, Biot-Savart, and Grad-Shafranov.
Requirements
pip install cfsem
To include this library in a Rust project, add an entry to your Cargo.toml's [dependencies] section:
cfsem = "*"
For Python installation, see the docs for the Python library.
Benchmarks are configured in Cargo.toml, and can be run via cargo:
cargo bench
Requirements
To install in the active python environment, do
uv pip install -e .[dev]
To build the Rust bindings only, do
maturin develop --release --features=python
No part of installation requires root. If access issues are encountered, this can likely be resolved by using a virtual environment.
Some computationally-expensive calculations are written in Rust. These calculations and their python bindings are installed from pre-built binaries when installing from pypi or compiled during local development installation, with no intervention from the user in either case. Symmetric bindings with docstrings are available in the bindings.py module and re-exported at the library level.
To build with all of the optimizations available on your local machine, you can do:
RUSTCFLAGS="-Ctarget-cpu=native" maturin develop --release --features=python
pip install -e .[dev]
Contributions consistent with the goals and anti-goals of the package are welcome.
Please make an issue ticket to discuss changes before investing significant time into a branch.
Goals
Anti-Goals
Licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT) .