Skip to main content

rsdag

Python bindings for rsdag, an expression graph backend written in Rust. A Python function is traced into a hash-consed graph, differentiated symbolically and evaluated by an interpreter or as native machine code (x86-64 and AArch64).

pip install rsdag

Wheels for Linux (x86-64, aarch64), macOS (arm64 and x86-64) and Windows (x86-64), CPython 3.11 and newer.

Example

import numpy as np
from rsdag import jit, jacobian, matmul, solve

def lorenz(x, t):
    s, r, b = 10.0, 28.0, 8.0 / 3.0
    return [s * (x[1] - x[0]), x[0] * (r - x[2]) - x[1], x[0] * x[1] - b * x[2]]

f = jit(lorenz, native=True)              # traces on first call, then native
y = f(np.array([1.0, 2.0, 3.0]), 0.0)
J = jacobian(lorenz)(np.array([1.0, 2.0, 3.0]), 0.0)   # (3, 3), symbolic
g = jit(lambda A, x: solve(A, matmul(A, x)))            # one Gemv, one Solve

jit, jacobian and grad trace on the first call and reuse the compiled program afterwards. Data-dependent Python control flow is not traceable; where(cond, a, b) with gt, lt, ... expresses elementwise conditions.

License

GNU Affero General Public License v3.0. The copyright holder licenses rsdag on other terms as well; for a commercial license contact info@milanrother.com.

Metadata

Release files for rsdag 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rsdag 1.0.0
File Size Uploaded
rsdag-1.0.0.tar.gz 283.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for rsdag 1.0.0
File
rsdag-1.0.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
rsdag-1.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
rsdag-1.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
rsdag-1.0.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.11 abi3 macOS 11.0+ ARM64, macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64) Details

Total release size: 3.5 MB

Release files / rsdag-1.0.0.tar.gz

Download URL rsdag-1.0.0.tar.gz
Size 283.3 kB
Tags Source
SHA-256 checksum
How to use checksums
334005d41857914fa7eac0c00f005f86aeba1fc12d58ed93023c5c527e4310b8
BLAKE2b-256 checksum
How to use checksums
34b90fc5cc0d6502ea2c928a9986aae585ce48b96a54d0f3dae2f358fb9ea097
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / rsdag-1.0.0-cp311-abi3-win_amd64.whl

Download URL rsdag-1.0.0-cp311-abi3-win_amd64.whl
Size 605.2 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3165f5974467b2af65014b2c3505f38c9abff2029961c8638e212a51e5a1343d
BLAKE2b-256 checksum
How to use checksums
b0e7cfabbe2c905b6c17d86878270a2ea8b0f69a4a5bde328b3072783f5fc5b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / rsdag-1.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL rsdag-1.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 722.5 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
14282932ef04e32172fb041fa6d9dbae0f8e76ae92a493aa5854d2236175d491
BLAKE2b-256 checksum
How to use checksums
e809bd14f3d27400412434ee2c768d80b27dce77c69cb1e113a5df8900b947a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / rsdag-1.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL rsdag-1.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 638.0 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2be330e14312ca6bb5259427a1303827a60c832f196c4a6890a2a41249b97359
BLAKE2b-256 checksum
How to use checksums
d2dae6b4f18799b204de06d0ca256f0618dcb8635f6c619a395d6ba6ec82582f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / rsdag-1.0.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL rsdag-1.0.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.3 MB
Tags CPython 3.11 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8d3d9f528c71f7be48d40e07ff226385bc7bdff03e3b24d6365c98bef2005068
BLAKE2b-256 checksum
How to use checksums
fb6f145c498b5b4c16eff4378787bf3a4e990117f2b8d3e8507708f506bcee46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.0

5 release files

This release

1.0.0 This release

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page