[package]
name = "numrs2"
version = "0.3.2"
edition = "2021"
authors = ["COOLJAPAN OU (Team KitaSan)"]
description = "A Rust implementation inspired by NumPy for numerical computing (NumRS2)"
license = "Apache-2.0"
repository = "https://github.com/cool-japan/numrs"
homepage = "https://github.com/cool-japan/numrs"
documentation = "https://docs.rs/numrs2"
readme = "README.md"
keywords = ["numpy", "numerical", "array", "linear-algebra", "mathematics"]
categories = ["science"]
[lib]
name = "numrs2"
[lints]
workspace = true
[features]
default = ["matrix_decomp", "scirs"]
matrix_decomp = []
validation = []
unstable = []
fast = []
scirs = []
gpu = ["dep:wgpu", "dep:bytemuck", "dep:futures-intrusive", "dep:tokio"]
lapack = []
python = ["dep:pyo3", "dep:scirs2-numpy"]
arrow = ["dep:arrow", "dep:arrow-array", "dep:arrow-buffer", "dep:arrow-cast", "dep:arrow-schema"]
parquet = ["dep:parquet"]
netcdf = ["dep:netcdf3"]
matlab = ["dep:matfile"]
messagepack = ["dep:rmp-serde"]
bson = ["dep:bson"]
io-all = ["arrow", "parquet", "netcdf", "matlab", "messagepack", "bson"]
wasm = ["dep:wasm-bindgen", "dep:wasm-bindgen-futures", "dep:js-sys", "dep:web-sys", "dep:console_error_panic_hook", "dep:wee_alloc"]
distributed = ["dep:tokio", "tokio/net", "tokio/io-util", "tokio/rt-multi-thread", "tokio/macros", "tokio/time"]
visualization = ["dep:plotters", "dep:plotters-backend", "dep:plotters-svg", "dep:resvg", "dep:usvg", "dep:tiny-skia", "dep:rgb"]
ci-safe = ["matrix_decomp", "validation"]
[dependencies]
scirs2-core = { version = "0.4.0", features = ["random", "array", "simd", "parallel", "linalg"] }
scirs2-stats = { version = "0.4.0" }
scirs2-linalg = { version = "0.4.0" }
scirs2-ndimage = { version = "0.4.0" }
scirs2-spatial = { version = "0.4.0", features = ["parallel"] }
scirs2-special = { version = "0.4.0" }
scirs2-fft = { version = "0.4.0" }
num-traits = "0.2.19"
paste = "1.0.15"
thiserror = "2.0.18"
lazy_static = "1.5.0"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
csv = "1.4.0"
oxicode = { version = "0.2", features = ["serde"] }
byteorder = "1.5.0"
oxiarc-archive = { version = "0.2.6" }
serde-pickle = "1.2.0"
memmap2 = "0.9.10"
num_cpus = "1.17.0"
regex = "1.12.3"
chrono = { version = "0.4.44", default-features = false, features = ["std", "clock"] }
wgpu = { version = "29.0.1", optional = true }
bytemuck = { version = "1.25.0", features = ["derive"], optional = true }
futures-intrusive = { version = "0.5.0", optional = true }
tokio = { version = "1.50.0", features = ["sync", "rt", "net", "io-util", "rt-multi-thread", "macros"], optional = true }
pyo3 = { version = "0.28.2", features = ["extension-module"], optional = true }
scirs2-numpy = { workspace = true, optional = true }
arrow = { workspace = true, optional = true }
arrow-array = { workspace = true, optional = true }
arrow-buffer = { workspace = true, optional = true }
arrow-cast = { workspace = true, optional = true }
arrow-schema = { workspace = true, optional = true }
parquet = { workspace = true, optional = true }
netcdf3 = { version = "0.6.0", optional = true }
matfile = { version = "0.5.0", optional = true, features = ["ndarray"] }
rmp-serde = { version = "1.3.1", optional = true }
bson = { version = "3.1.0", optional = true, features = ["serde"] }
wasm-bindgen = { version = "0.2.114", optional = true, features = ["serde-serialize"] }
wasm-bindgen-futures = { version = "0.4.64", optional = true }
js-sys = { version = "0.3.91", optional = true }
web-sys = { version = "0.3.91", optional = true, features = ["console", "Window", "Performance"] }
console_error_panic_hook = { version = "0.1.7", optional = true }
wee_alloc = { version = "0.4.5", optional = true }
plotters = { version = "0.3.7", optional = true }
plotters-backend = { version = "0.3.7", optional = true }
plotters-svg = { version = "0.3.7", optional = true }
resvg = { version = "0.47.0", optional = true }
usvg = { version = "0.47.0", optional = true }
tiny-skia = { version = "0.12.0", optional = true }
rgb = { version = "0.8.53", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.4", default-features = false, features = ["wasm_js"] }
getrandom_02 = { package = "getrandom", version = "=0.2.17", default-features = false, features = ["js"] }
uuid = { version = "1.23", features = ["js"] }
[dev-dependencies]
criterion = "0.8.2"
approx = "0.5.1"
tempfile = "3.27.0"
proptest = "1.11.0"
serial_test = "3.4.0"
wasm-bindgen-test = "0.3.64"
serde_json = "1.0.149"
tokio = { version = "1.50.0", features = ["rt", "macros"] }
[workspace.lints.rust]
unused_variables = "allow"
unused_imports = "allow"
mismatched_lifetime_syntaxes = "allow"
dead_code = "allow"
unpredictable_function_pointer_comparisons = "allow"
unknown_lints = "allow"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
overflow-checks = false
debug = false
[profile.bench]
inherits = "release"
debug = true
strip = false
[profile.dev]
opt-level = 0
debug = true
overflow-checks = true
[profile.test]
opt-level = 2
debug = true
overflow-checks = true
[[bench]]
name = "numpy_comparison"
path = "bench/bench.rs"
harness = true
[[bench]]
name = "bench_distributions"
path = "bench/bench_distributions.rs"
harness = false
[[bench]]
name = "numpy_comparison_benchmark"
path = "bench/numpy_comparison_benchmark.rs"
harness = false
[[bench]]
name = "core_operations_benchmark"
path = "bench/core_operations_benchmark.rs"
harness = false
[[bench]]
name = "simd_vs_scalar_benchmark"
path = "bench/simd_vs_scalar_benchmark.rs"
harness = false
[[bench]]
name = "expression_templates_benchmark"
path = "bench/expression_templates_benchmark.rs"
harness = false
[[bench]]
name = "linalg_benchmarks"
path = "bench/linalg_benchmarks.rs"
harness = false
[[bench]]
name = "stats_benchmarks"
path = "bench/stats_benchmarks.rs"
harness = false
[[bench]]
name = "fft_benchmarks"
path = "bench/fft_benchmarks.rs"
harness = false
[[bench]]
name = "array_ops_benchmarks"
path = "bench/array_ops_benchmarks.rs"
harness = false
[[bench]]
name = "optimization_benchmarks"
path = "bench/optimization_benchmarks.rs"
harness = false
[[bench]]
name = "simd_comparison_benchmark"
path = "bench/simd_comparison_benchmark.rs"
harness = false
[[bench]]
name = "parallel_benchmarks"
path = "bench/parallel_benchmarks.rs"
harness = false
[[bench]]
name = "memory_benchmarks"
path = "bench/memory_benchmarks.rs"
harness = false
[[bench]]
name = "nn_benchmarks"
path = "bench/nn_benchmarks.rs"
harness = false
[[bench]]
name = "distributed_benchmarks"
path = "bench/distributed_benchmarks.rs"
harness = false
required-features = ["distributed"]
[[bench]]
name = "multi_objective_benchmark"
path = "benches/multi_objective_benchmark.rs"
harness = false
[[bench]]
name = "memory_optimization_benchmark"
path = "benches/memory_optimization_benchmark.rs"
harness = false
[[bench]]
name = "parallel_algorithms_benchmark"
path = "benches/parallel_algorithms_benchmark.rs"
harness = false
[[bench]]
name = "cache_alignment_benchmark"
path = "benches/cache_alignment_benchmark.rs"
harness = false
[workspace.dependencies]
scirs2-core = { version = "0.4.0" }
scirs2-stats = { version = "0.4.0" }
scirs2-linalg = { version = "0.4.0" }
scirs2-ndimage = { version = "0.4.0" }
scirs2-spatial = { version = "0.4.0" }
scirs2-special = { version = "0.4.0" }
scirs2-fft = { version = "0.4.0" }
scirs2-numpy = { version = "0.4.0" }
arrow = "58.1.0"
arrow-array = "58.1.0"
arrow-buffer = "58.1.0"
arrow-cast = "58.1.0"
arrow-schema = "58.1.0"
parquet = "58.1.0"