UP | HOME

Install

Pick one language.

Binding Install
Rust cargo add minimage
Python pip install minimage
C / C++ Meson wrap, CMake find_package(minimage), or pkg-config minimage

Rust

use minimage::Cell;

let sim = Cell::ortho(10.0, 10.0, 10.0)?;
assert!((sim.dist2([0.2, 0.0, 0.0], [9.4, 0.0, 0.0]) - 0.64).abs() < 1e-12);

Python

Python 3.10 or newer. Each release has one abi3 wheel per platform, for Linux x86_64 and aarch64 (manylinux_2_28), macOS arm64 and Windows x86_64, which covers every CPython from 3.10 on. Elsewhere pip builds the sdist, which needs a Rust toolchain.

import minimage

cell = minimage.Cell.ortho(10.0, 10.0, 10.0)
print(cell.dist2([0.2, 0.0, 0.0], [9.4, 0.0, 0.0]))

Meson wrap

[wrap-git]
url = https://github.com/lode-org/minimage.git
revision = v0.2.1
depth = 1

[provide]
minimage = minimage_dep

Next: tutorial.