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.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

rustronomy-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl (260.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

File details

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

File metadata

  • Download URL: rustronomy-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • 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.0.tar.gz
Algorithm Hash digest
SHA256 8facfa54dfaf9f9aade5159fe1d9955d9e2e9ba6ff05eead3c916873902a9280
MD5 93274bfd69197d8027e500edf2a250e5
BLAKE2b-256 217c6486742d1626d90969dbf7141a697ddf09892825eae4f25d69ea38a09fa7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustronomy-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 260.0 kB
  • 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.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 30ec54c9b3d5e05f1018a6c7a81d3f1cb08c3b10285ab2ff63602ab8e75993ee
MD5 55b81bdad122b673aafe53b2aeadc796
BLAKE2b-256 62a438d96b965be6f99e822093ceed0fae50e0b5325cdd22e25bdac0bedd76a3

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