Skip to main content

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

  1. Create an API token on PyPI.
  2. Export it in your shell:
export MATURIN_PYPI_TOKEN=pypi-...
  1. Build the distribution artifacts locally:
uvx maturin build
  1. 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))"
  1. Publish to TestPyPI first:
uvx maturin publish --repository testpypi
  1. 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 bindings
  • Cargo.toml Rust package configuration
  • pyproject.toml maturin/Python packaging configuration

Minimal API

  • trace_fieldlines(...) fixed-step tracer (RK4)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rustronomy-0.1.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rustronomy-0.1.1-cp314-cp314-manylinux_2_34_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

rustronomy-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl (297.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

Details for the file rustronomy-0.1.1.tar.gz.

File metadata

  • Download URL: rustronomy-0.1.1.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

Hashes for rustronomy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 079f7921c7e582a4aae4bd1d460097dc2ce15dbe7153d8371fbc77b83d04b0aa
MD5 6c4680de7217b77fdfbfde49ca83c6d1
BLAKE2b-256 0cac1859e7e0d8570718f93ef90e139fe31de70ea76be34dfcdfd0b8329087b6

See more details on using hashes here.

File details

Details for the file rustronomy-0.1.1-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: rustronomy-0.1.1-cp314-cp314-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.14, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rustronomy-0.1.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 219e474739107766076cdcee848bb50fbfa81074ed038d2c0d040ca6f03b6a93
MD5 ec4e3eeed9e409c7ca231ab5b55ecb88
BLAKE2b-256 3bc5c94830121161f253809c5b131c2029f799b5b9deecaa22d1d7e845160f24

See more details on using hashes here.

File details

Details for the file rustronomy-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rustronomy-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0c4bb2063a0382da6f17d1c920882f81a96be5525b7ec32671891b694885c59a
MD5 627af11cb4d2e84b31a0aeec35cc60da
BLAKE2b-256 cba7b8c1c9136bdac16bb6dc0e1c8433db073179ec5327c5127db597a3a047c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page