-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
36 lines (33 loc) · 1.59 KB
/
Cargo.toml
File metadata and controls
36 lines (33 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[package]
name = "python-examples"
description = "Interfacing between Rusts's ndarray and Python's numpy."
version = "0.2.0"
authors = ["Benjamin Kay <benjamin@benkay.net>"]
edition = "2018"
# Workaround for having binaries and an extension module in the same project.
# See https://pyo3.rs/v0.14.2/faq.html#i-cant-run-cargo-test-im-having-linker-issues-like-symbol-not-found-or-undefined-reference-to-_pyexc_systemerror
[features]
extension-module = ["pyo3/extension-module"]
default = ["extension-module"]
# Needed specifically for the python extension module example, see src/lib.rs.
# We will need maturin to actually build a Python wheel.
[lib]
name = "rust_ext" # name of the extension module
crate-type = ["cdylib"]
[dependencies]
# The pyo3 crate is the de facto standard for Python <--> Rust bindings.
# Use the latest stable version.
# See ../rust/Cargo.toml for other version dependencies.
pyo3 = "~0.14"
# Pure Rust implementation of the numpy (npy) file format.
# Don't need (default enabled) support for npz files.
ndarray-npy = { version = "~0.8", default-features = false }
# The numpy crate integrates with pyo3 for low-cost conversions between Python's
# numpy arrays and Rust's ndarray arrays. It is not needed for basic
# Python <--> Rust integration.
numpy = "~0.14"
# The usual ndarray dependencies, see ../rust/Cargo.toml for more information.
# Note these examples do not need ndarray-linalg.
ndarray = { version = "~0.15", features = ["blas"] }
blas-src = { version = "~0.8", default-features = false, features = ["openblas"] }
openblas-src = { version = "~0.10", features = ["cblas", "system"] }