Skip to main content

loop-interpolation-core

Purpose

This package is the native core of the low-memory interpolator. It is a Python extension module, built with maturin. It is named loop_interpolation_core on import. The package solves the finite difference interpolation problem without building the sparse constraint rows in Python.

The package is optional. The loop-interpolation package works without it.

Specification

The requirements and the design are in specs/001-low-memory-interpolator/spec.md.

Forms

The crate builds in three forms:

  • Rust library (rlib). Use it from other Rust crates.
  • Python module (PyO3). It uses the abi3 stable ABI, so one wheel works for Python 3.9 and later.
  • Browser module (wasm-bindgen). It runs in a Web Worker. The worker code is in web/.

Feature flags

Feature Effect
parallel Uses rayon threads. Off for cargo by default. On for the Python wheel.
python Builds the PyO3 bindings.
wasm Builds the wasm-bindgen bindings.

With no feature, the code runs on one thread and has no dependency.

Build commands

Python module

pip install maturin
maturin develop --release -m packages/loop_interpolation_core/Cargo.toml

The pyproject.toml sets the features python and parallel. If you pass --features, you must list both: --features python,parallel. The option --features parallel alone replaces the list. The build then fails with an "install cffi" message.

Browser module

bash packages/loop_interpolation_core/scripts/build_wasm.sh

You need these tools:

  • The wasm32-unknown-unknown Rust target.
  • A wasm-bindgen CLI with the same version as the wasm-bindgen crate in Cargo.lock. The script stops if the versions differ.
  • wasm-opt is optional. If it is missing, the script skips this step.

The script writes the output to packages/loop_interpolation_core/pkg/.

Tests and lint

Run these commands from packages/loop_interpolation_core:

cargo test --release
cargo test --release --features parallel

cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --features python -- -D warnings
cargo clippy --features wasm --target wasm32-unknown-unknown -- -D warnings

To run the browser tests:

npm --prefix packages/loop_interpolation_core/tests_web ci
npm --prefix packages/loop_interpolation_core/tests_web test

Contract

  • Inputs are flat arrays. Points are stored as 3n values, one x, y, z set for each point.
  • The grid uses grid coordinates only. The grid has no rotation. The caller transforms the coordinates.
  • Node order is x fastest.
  • Errors name the constraint that failed. For example, value[3].
  • A solve is a session. You step the session to advance the solve. To cancel it, drop the session.
  • The memory estimate is available before the solve.
  • Set budget_bytes to limit the memory of a solve.

Differences from loop-rs

  • Grid rotation is removed. The functions rotation, to_local and direction_to_local are not in this crate. The serde feature is also removed.
  • Solve sessions replace the closure-style solvers. A session has step and cancel.
  • Memory tracking is new. The crate uses try_reserve, a byte budget and a memory estimate.
  • Curvature rows are added only at nodes that are interior on all three axes. The border rows are centred second derivatives [1, -2, 1] on layers 1 and n-2. The gradient strike and dip basis is the Python strike and dip basis. So the field equals the field of the Python matrix solver.
  • Only the ADMM solver is in this crate. There is no active-set solver and no hybrid solver. A feasibility check runs before the solve. The solver stops when the violation is at most 1e-4 of the field range.
  • Single precision (f32) is available. The residual check runs in double precision.

Measured values

  • Memory: 63 bytes per node for R1, a 100 x 100 x 100 grid with 2000 value rows and 500 gradient rows. The value is the peak heap size divided by the number of nodes. It does not include the copy of the field that goes to JavaScript, which takes 8 bytes per node.
  • Comparison with the Python matrix solver on a 100 x 100 x 100 grid: the native solver uses 84 MB where the matrix solver uses 2445 MB (29 times less). On one thread it is 10 to 30 percent slower. With the parallel feature (the default of the Python wheel) it is about 3 times faster. The numbers are in specs/001-low-memory-interpolator/measurements.md.
  • Browser size: the gzip size of the .wasm file is about 92 KB. The limit is 2 MB.

Source

Source: loop-rs crates/interpolation-fd, commit bff51342da8ebff7ca3c87e07c1d4fbd31279c8b, branch lachlan/drillhole

Metadata

Release files for loop-interpolation-core 0.1.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 loop-interpolation-core 0.1.0
File Size Uploaded Provenance Actions
loop_interpolation_core-0.1.0.tar.gz 216.1 kB With provenance Details for loop_interpolation_core-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for loop-interpolation-core 0.1.0
File Actions
loop_interpolation_core-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for loop_interpolation_core-0.1.0-cp39-abi3-win_amd64.whl
loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
loop_interpolation_core-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for loop_interpolation_core-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
loop_interpolation_core-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for loop_interpolation_core-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 4.2 MB

Release files / loop_interpolation_core-0.1.0.tar.gz

Download URL loop_interpolation_core-0.1.0.tar.gz
Size 216.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b08ac0548db38dd86aebcb337aed38fec3f89ec13b998c9cc439bcb016adc27d
BLAKE2b-256 checksum
How to use checksums
f866e79047907c88a37ed49f0f366d0b10cf2261a41862e3e281bf7ca1f4b02d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / loop_interpolation_core-0.1.0-cp39-abi3-win_amd64.whl

Download URL loop_interpolation_core-0.1.0-cp39-abi3-win_amd64.whl
Size 424.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
61997859341ec909be63d8f357ee70d961fa51fb9e8c8aa7c8142011efa9dbc5
BLAKE2b-256 checksum
How to use checksums
248f178f36217020865bce930dc4b0f058c8bce596247eb641c5c1c28bebae32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 616.4 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
25bcff3d07d306969e17564676e3903c8ae9ef52bd884b2525600ef92a25f687
BLAKE2b-256 checksum
How to use checksums
b2ad4d8071e0bcc87e7da74f464c83b3bfb90224f476f12237a4f68e58e11a29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL loop_interpolation_core-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 611.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f9c500df1beb54a5b84a5492cf0c9f62dfcf1eefce954a73834bc94b0c23d014
BLAKE2b-256 checksum
How to use checksums
2409b3ac316f557ee304bb080d233aa2eb20db1155a146d921cc547ffd578a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 616.4 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
bd00b70db5bdabbb43712b7114c381423d3e9fea7d07e52a72c8fdeeb58599dc
BLAKE2b-256 checksum
How to use checksums
d2d40b0ff40bb98dfde737016a91541e9ca10494b146e3a501fdd5d5fe662fe7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

Release files / loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL loop_interpolation_core-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 611.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b3230a3242af98e9c5855d92db5f39b1daf73492ac2143338a1eed10f798178c
BLAKE2b-256 checksum
How to use checksums
2ec96038c183f28ac8d582785c5e0bc36f4c4cde24d442126067680512428b4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

Release files / loop_interpolation_core-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL loop_interpolation_core-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 546.5 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5984de236af932593fac70cc36a44df44598781f1c4f10e312a5a520c869e454
BLAKE2b-256 checksum
How to use checksums
ed7ffbae72ba2a3bf0b6c1559907297bf4737464dbbe9d5f07cd2adb96d076e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / loop_interpolation_core-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL loop_interpolation_core-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 556.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9d2d449bdbfb4b6a0cd63afa0785651b5adee910776b1b20f3f75efff6abb3f7
BLAKE2b-256 checksum
How to use checksums
17c5e098eeecb30bc28a41422553999a5e0dbab2015de3072c35bbe9af9ac1c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for loop-interpolation-core 0.1.0

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.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for loop_interpolation_core-0.1.0.tar.gz

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 Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

8 release files Full provenance

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