rustorch 0.6.26

Production-ready PyTorch-compatible deep learning library in Rust with special mathematical functions (gamma, Bessel, error functions), statistical distributions, Fourier transforms (FFT/RFFT), matrix decomposition (SVD/QR/LU/eigenvalue), automatic differentiation, neural networks, computer vision transforms, complete GPU acceleration (CUDA/Metal/OpenCL), SIMD optimizations, parallel processing, WebAssembly browser support, comprehensive distributed learning support, and performance validation
Documentation
#!/bin/bash

# Binder post-build script for RusTorch
set -e

echo "πŸ”§ Building RusTorch Python bindings for Binder..."

# Setup Rust environment
echo "πŸ¦€ Setting up Rust environment..."
export PATH="${HOME}/.cargo/bin:${PATH}"

# Verify Rust is available
if command -v rustc &> /dev/null; then
    echo "βœ… Rust compiler found: $(rustc --version)"
else
    echo "❌ Rust compiler not found"
    exit 1
fi

# Set conda environment variables for maturin
export CONDA_PREFIX=${NB_PYTHON_PREFIX}
export VIRTUAL_ENV=${NB_PYTHON_PREFIX}

# Set library paths for BLAS/LAPACK (in case needed)
export PKG_CONFIG_PATH="${NB_PYTHON_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export LIBRARY_PATH="${NB_PYTHON_PREFIX}/lib:${LIBRARY_PATH}"
export LD_LIBRARY_PATH="${NB_PYTHON_PREFIX}/lib:${LD_LIBRARY_PATH}"

# Build wheel and install (compatible with conda environment)
echo "πŸ“¦ Building wheel..."
# Build without linalg feature to avoid LAPACK/BLAS dependency issues in Binder
maturin build --release --out dist --compatibility linux --no-default-features

# Install the built wheel
echo "πŸ“₯ Installing wheel..."
pip install dist/*.whl

# Test the installation
echo "πŸ§ͺ Testing installation..."
python3 -c "
try:
    import rustorch
    print('βœ… RusTorch successfully installed in Binder!')
    print('βœ… RusTorch Binderγ‚€γƒ³γ‚ΉγƒˆγƒΌγƒ«ζˆεŠŸοΌ')
except ImportError as e:
    print(f'❌ Import failed: {e}')
    exit(1)
"

echo "βœ… RusTorch Binder setup complete!"