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.2.tar.gz (7.8 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.2-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.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

Hashes for rustronomy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b0500af1137b2ba1a9371970d50a9cc5e636444c68c79e5b2392eef2509b8d55
MD5 5dd58eafc3a4a95fcf5e7a5e78bb4f70
BLAKE2b-256 3afcbdc0eef7bee65f11f00ac6b72ec46fa3e9456a0fab84a273666b6f1423c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rustronomy-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1333ee0c6e99450a32cba706c8ab36853289a367cd4c34825c53be73c61d5a87
MD5 fe5cde9634499c2024b053178152ddb8
BLAKE2b-256 a85c32ca95698db8b7a9f3ffba96f4767b97fa4014fcad68ae93468b00e19164

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