Rust library for tracing 2D field lines with optional Python bindings
Project description
rustronomy
Simple Rust-backed Python module for tracing field lines.
This package is built with maturin and published to PyPI as rustronomy.
Build and install locally
uv pip install -e .
This installs:
rustronomy(Rust extension module)
If you prefer using maturin directly:
maturin develop
Minimal API usage
import numpy as np
import rustronomy
paths = rustronomy.trace_fieldlines(
xmin=0.0,
xmax=1.0,
ymin=0.0,
ymax=1.0,
nx=16,
ny=16,
bx=np.ones(16 * 16),
by=np.zeros(16 * 16),
seeds=[(0.1, 0.1), (0.2, 0.3)],
step=0.01,
max_steps=1024,
)
This project now keeps a small, non-public API focused on one task: compute field lines.
Publish to PyPI
- Create an API token on PyPI.
- Export it in your shell:
export MATURIN_PYPI_TOKEN=pypi-...
- Build the distribution artifacts locally:
uvx maturin build
- Optionally validate the built wheel in a clean environment:
uv venv /tmp/rustronomy-test
source /tmp/rustronomy-test/bin/activate
uv pip install dist/*.whl
python -c "import rustronomy; print(sorted(name for name in dir(rustronomy) if 'fieldlines' in name))"
- Publish to TestPyPI first:
uvx maturin publish --repository testpypi
- Publish to PyPI:
uvx maturin publish
If the name rustronomy is already taken on PyPI, change the name field in pyproject.toml before publishing.
Minimal repository layout
src/core Rust tracing implementation and Python bindingsCargo.tomlRust package configurationpyproject.tomlmaturin/Python packaging configuration
Minimal API
trace_fieldlines(...)fixed-step tracer (RK4)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 rustronomy-0.1.2.tar.gz.
File metadata
- Download URL: rustronomy-0.1.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0500af1137b2ba1a9371970d50a9cc5e636444c68c79e5b2392eef2509b8d55
|
|
| MD5 |
5dd58eafc3a4a95fcf5e7a5e78bb4f70
|
|
| BLAKE2b-256 |
3afcbdc0eef7bee65f11f00ac6b72ec46fa3e9456a0fab84a273666b6f1423c5
|
File details
Details for the file rustronomy-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: rustronomy-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 297.9 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1333ee0c6e99450a32cba706c8ab36853289a367cd4c34825c53be73c61d5a87
|
|
| MD5 |
fe5cde9634499c2024b053178152ddb8
|
|
| BLAKE2b-256 |
a85c32ca95698db8b7a9f3ffba96f4767b97fa4014fcad68ae93468b00e19164
|