spintronics 0.2.0

Pure Rust library for simulating spin dynamics, spin current generation, and conversion phenomena in magnetic and topological materials
Documentation
[package]
name = "spintronics"
version = "0.2.0"
edition = "2021"
rust-version = "1.70.0"
authors = ["COOLJAPAN OÜ (Team KitaSan)"]
description = "Pure Rust library for simulating spin dynamics, spin current generation, and conversion phenomena in magnetic and topological materials"
license = "MIT OR Apache-2.0"
readme = "README.md"
homepage = "https://github.com/cool-japan/spintronics"
keywords = ["spintronics", "magnetism", "physics", "simulation", "materials"]
categories = ["science", "simulation", "wasm"]
repository = "https://github.com/cool-japan/spintronics"
documentation = "https://docs.rs/spintronics"
exclude = [
    "test_*",           # Test binaries (test_mag - 43MB)
    "performance_*",    # Performance binaries (performance_analysis - 4.4MB)
    "*.csv",            # Test output files
    "*.vtu",            # VTK output files
    "*.vtk",            # VTK output files
    "*.json",           # Simulation output files
    "wasm-demo/pkg/",   # Precompiled WASM artifacts
    "pkg/",             # Build artifacts
    ".cargo/",          # Cargo local config
    "TODO.md",          # Internal documentation
]

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
# Core system: RNG, statistical distributions, physical computing utilities, parallelization
# Note: Optional for WASM builds (not needed for basic simulations)
scirs2-core = { version = "0.1.0-rc.4", features = ["random", "parallel"], optional = true }

# FEM (Finite Element Method) support - disabled for WASM
scirs2-spatial = { version = "0.1.0-rc.4", optional = true }

# Serialization support (v0.2.0)
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }

# Python bindings (v0.2.0)
pyo3 = { version = "0.25", features = ["extension-module"], optional = true }
numpy = { version = "0.25", optional = true }

# HDF5 file format support (v0.2.0)
hdf5 = { version = "0.8", optional = true }

# WebAssembly support
wasm-bindgen = { version = "0.2", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
js-sys = { version = "0.3", optional = true }
web-sys = { version = "0.3", features = ["console", "Window", "Document"], optional = true }
console_error_panic_hook = { version = "0.1", optional = true }
getrandom = { version = "0.3", features = ["wasm_js"], optional = true }

[dev-dependencies]
wasm-bindgen-test = "0.3"

[features]
default = ["fem", "scirs2", "serde"]
fem = ["scirs2-spatial"]
scirs2 = ["scirs2-core"]
serde = ["dep:serde", "dep:serde_json"]
python = ["pyo3", "numpy"]
hdf5 = ["dep:hdf5"]
wasm = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "web-sys", "console_error_panic_hook", "getrandom"]

[[example]]
name = "yig_pt_pumping"
path = "examples/yig_pt_pumping.rs"

[[example]]
name = "magnon_propagation"
path = "examples/magnon_propagation.rs"

[workspace]
members = ["demo"]