pyrucast
Bibliothèque d'éléments finis en Rust, inspirée de cast3m, exposée à Python —
et utilisable telle quelle en Rust pur (pyo3 est une dépendance
optionnelle : un build par défaut ne tire ni pyo3 ni libpython).
- Documentation complète : le book mdbook dans
book/(architecture, modèle mémoire, maillage, champs, physiques…) —mdbook build bookpour le HTML. - Référence API Rust :
cargo doc --no-deps --lib --open.
Prérequis
| Outil | Version | Installation |
|---|---|---|
| Rust | stable (édition 2021) | rustup |
| Python | ≥ 3.9 | API Python uniquement — inutile en Rust pur |
| En-têtes Python | — | API Python uniquement — Linux : python3-dev (Debian/Ubuntu) ou python3-devel (Fedora/RHEL). Windows : inclus dans l'installateur officiel. |
Usage en Rust pur (sans Python)
[dependencies]
pyrucast = { git = "…", default-features = false } # pas de pyo3, pas de libpython
use pyrucast::atoms::ElementType;
let mesh = pyrucast::ops::mesh::triangulate_surface(&contour, ElementType::TRI3, Some(1.0))?;
cargo build / cargo test (sans feature) compilent le cœur en Rust pur —
ni Python ni venv requis. L'API Python (#[pyclass]) vit derrière la feature
python-api, activée automatiquement par maturin.
Compilation dans un venv (API Python)
Pour les builds avec l'API Python (maturin, ou cargo --features python-api), pyo3 localise l'interpréteur via VIRTUAL_ENV : activez
toujours le venv avant cargo ou maturin, sinon la compilation échoue avec
error: failed to run the Python interpreter at .... (Un cargo build pur n'a
pas cette contrainte.)
Linux / macOS
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip maturin
maturin develop --release
Windows (PowerShell)
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install --upgrade pip maturin
maturin develop --release
maturin develop compile le module et l'installe dans le venv. Vérification :
python -c "import pyrucast; c = pyrucast.Coords(2); print(c)"
Après toute modification du Rust, relancer simplement maturin develop --release.
Développement
pip install pytest ruff # en plus de maturin, dans le venv
cargo build # cœur Rust pur (sans pyo3 ; pas besoin du venv)
cargo test # tests unitaires + intégration + doctests (Rust pur)
maturin develop && python -m pytest # tests Python
cargo fmt && ruff format . # formatage standard (Rust + Python)
bash script/check_all.sh # enchaîne toutes les vérifications (formatage inclus)
bash script/check_doc.sh # ou un seul bloc : format / rust / python / examples / doc
Le chapitre Compilation et tests du book détaille les
features Cargo (viz, viz-interactive, stub-gen…), la génération du stub
python/pyrucast/_pyrucast/__init__.pyi et le dépannage courant.
Licence
Distribué sous licence Mozilla Public License 2.0 (MPL-2.0).
C'est un copyleft au fichier : toute modification d'un fichier source de pyrucast doit être republiée sous MPL, mais on peut librement construire du code propriétaire au-dessus de la bibliothèque et l'y combiner. La MPL est par ailleurs compatible GPL/CeCILL (« Secondary Licenses », §3.3).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrucast-0.3.1.tar.gz.
File metadata
- Download URL: pyrucast-0.3.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d894c7748d662ff10c80383ad0d997008bf2668d7c5f87418488b367b0f74d78
|
|
| MD5 |
78e57b7b3fb85484872e9ecf3aa11455
|
|
| BLAKE2b-256 |
cc1c3f3998dd918c5e2a630a18df202dab85b0a3e6de180d618720129bb9bd03
|
Provenance
The following attestation bundles were made for pyrucast-0.3.1.tar.gz:
Publisher:
release.yml on Pyrucast/pyrucast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrucast-0.3.1.tar.gz -
Subject digest:
d894c7748d662ff10c80383ad0d997008bf2668d7c5f87418488b367b0f74d78 - Sigstore transparency entry: 2527230826
- Sigstore integration time:
-
Permalink:
Pyrucast/pyrucast@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Pyrucast
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrucast-0.3.1-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: pyrucast-0.3.1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c948652ace83c10d27ea79df903317e093aade9f5af4527ec2c97c406dff0fc4
|
|
| MD5 |
1ff23f5b891a13f44bb806c9e4598d22
|
|
| BLAKE2b-256 |
8902ac59e13d428e9ac56482efaf788b7e9d26aef93677228267f7adf522bb79
|
Provenance
The following attestation bundles were made for pyrucast-0.3.1-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on Pyrucast/pyrucast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrucast-0.3.1-cp39-abi3-win_amd64.whl -
Subject digest:
c948652ace83c10d27ea79df903317e093aade9f5af4527ec2c97c406dff0fc4 - Sigstore transparency entry: 2527231071
- Sigstore integration time:
-
Permalink:
Pyrucast/pyrucast@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Pyrucast
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrucast-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyrucast-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
853d46c4bdec32938e7296eb81400909c902c6f1973913a60bb365b66213bf54
|
|
| MD5 |
7dd5e4d16741330a9969e19c488864a4
|
|
| BLAKE2b-256 |
37d45adc5831e19f0ce697da4fb88f6d0f5a1e196a3105949c719db224c8b885
|
Provenance
The following attestation bundles were made for pyrucast-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Pyrucast/pyrucast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrucast-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
853d46c4bdec32938e7296eb81400909c902c6f1973913a60bb365b66213bf54 - Sigstore transparency entry: 2527231388
- Sigstore integration time:
-
Permalink:
Pyrucast/pyrucast@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Pyrucast
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrucast-0.3.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: pyrucast-0.3.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 7.1 MB
- Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf47b4a50cb2b4049c490d305e372d00781eb449a421e58785c710e3d51cd69f
|
|
| MD5 |
fd51f91f1f8bd77efdeccbff4eb44708
|
|
| BLAKE2b-256 |
02d65ffc56c002d76e6325962ff0b79b96fa37eed3c6a32445495be80a79ec8d
|
Provenance
The following attestation bundles were made for pyrucast-0.3.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on Pyrucast/pyrucast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrucast-0.3.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
cf47b4a50cb2b4049c490d305e372d00781eb449a421e58785c710e3d51cd69f - Sigstore transparency entry: 2527231226
- Sigstore integration time:
-
Permalink:
Pyrucast/pyrucast@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Pyrucast
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa5f653dc91711fec574fa5e6d700190ca2e529d -
Trigger Event:
push
-
Statement type: