Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
RusTorch 🚀
A production-ready deep learning library in Rust with PyTorch-like API, GPU acceleration, and enterprise-grade performance
本番環境対応のRust製ディープラーニングライブラリ - PyTorchライクなAPI、GPU加速、エンタープライズグレードパフォーマンス
RusTorch is a fully functional deep learning library that leverages Rust's safety and performance, providing comprehensive tensor operations, automatic differentiation, neural network layers, transformer architectures, multi-backend GPU acceleration (CUDA/Metal/OpenCL), advanced SIMD optimizations, and enterprise-grade memory management features.
RusTorchは、Rustの安全性とパフォーマンスを活かした完全機能のディープラーニングライブラリです。包括的なテンソル演算、自動微分システム、ニューラルネットワーク層、Transformerアーキテクチャ、マルチバックエンドGPU加速(CUDA/Metal/OpenCL)、高度なSIMD最適化、エンタープライズグレードメモリ管理機能を提供します。
✨ Features / 主な特徴
- 🔥 Comprehensive Tensor Operations: Math operations, broadcasting, indexing, and statistics
包括的テンソル演算: 数学演算、ブロードキャスティング、インデックス操作、統計機能 - 🤖 Transformer Architecture: Complete transformer implementation with multi-head attention
Transformerアーキテクチャ: マルチヘッドアテンション付き完全なTransformer実装 - 📝 Embedding Systems: Word embeddings, positional encoding, sinusoidal encoding
埋め込みシステム: 単語埋め込み、位置エンコーディング、正弦波エンコーディング - 📊 Advanced Statistics: Mean, variance, std, median, quantile, covariance, correlation
高度な統計: 平均、分散、標準偏差、中央値、分位数、共分散、相関 - 🎯 Broadcasting Support: Automatic shape compatibility and dimension expansion
ブロードキャスティング: 自動形状互換性と次元拡張 - 🔍 Flexible Indexing: Select operations, slicing, and advanced tensor manipulation
柔軟なインデックス: 選択操作、スライシング、高度なテンソル操作 - 🧮 Mathematical Functions: Trigonometric, exponential, power, and activation functions
数学関数: 三角関数、指数関数、べき乗、活性化関数 - 🎲 Special Mathematical Functions: Gamma, Bessel, error functions with high precision and PyTorch compatibility
特殊数学関数: 高精度でPyTorch互換のガンマ、ベッセル、誤差関数- ⚠️ Note: Some special functions have precision limitations (1e-3 to 1e-6 accuracy) - contributions welcome for improved implementations
- 注意: 一部の特殊関数に精度制限あり(1e-3〜1e-6精度) - より高精度な実装の貢献を歓迎
- 📊 Statistical Distributions: Complete probability distributions (Normal, Gamma, Beta, etc.)
統計分布: 完全な確率分布(正規、ガンマ、ベータ等) - 🧠 Automatic Differentiation: Tape-based computational graph for gradient computation
自動微分: テープベースの計算グラフによる勾配計算 - 🏗️ Neural Network Layers: Linear, Conv1d/2d/3d, ConvTranspose, RNN/LSTM/GRU, BatchNorm, Dropout, and more
ニューラルネットワーク層: Linear、Conv1d/2d/3d、ConvTranspose、RNN/LSTM/GRU、BatchNorm、Dropout等 - 🖼️ Computer Vision: Advanced transformation pipelines with caching, conditional transforms, built-in datasets (MNIST, CIFAR-10/100)
コンピュータビジョン: キャッシュ、条件付き変換、組み込みデータセット(MNIST、CIFAR-10/100)を持つ高度な変換パイプライン - 🔧 Safe Operations: Type-safe tensor operations with comprehensive error handling
安全な操作: 包括的エラーハンドリング付き型安全テンソル演算 - ⚙️ Shared Base Traits: Reusable convolution and pooling base implementations
共有基底トレイト: 再利用可能な畳み込み・プーリング基底実装 - ⚡ SIMD Optimizations: AVX2/SSE4.1 vectorized operations for high performance
SIMD最適化: 高性能なAVX2/SSE4.1ベクトル化演算 - 🔄 Unified Parallel Operations: Trait-based parallel tensor operations with intelligent scheduling
統一並列操作: インテリジェントスケジューリング付きトレイトベース並列テンソル演算 - 🚀 Multi-threaded Processing: Rayon-based parallel batch operations and reductions
マルチスレッド処理: Rayonベース並列バッチ演算とリダクション - 🎮 GPU Integration: CUDA/Metal/OpenCL support with automatic device selection
GPU統合: 自動デバイス選択付きCUDA/Metal/OpenCLサポート - 💾 Advanced Memory Management: Zero-copy operations, SIMD-aligned allocation, and memory pools
高度メモリ管理: ゼロコピー操作、SIMDアライメント割り当て、メモリプール - 🛡️ Rust Safety: Memory safety and thread safety guarantees
Rust安全性: メモリ安全性とスレッドセーフティを保証 - 🌐 WebAssembly Support: Browser-compatible WASM bindings for client-side ML
WebAssemblyサポート: クライアントサイドML向けブラウザ互換WASMバインディング - 🧮 Matrix Decomposition: Complete SVD, QR, LU decomposition and eigenvalue solver with PyTorch compatibility
行列分解: PyTorch互換の完全なSVD、QR、LU分解と固有値求解 - 📁 Model Format Support: Safetensors, ONNX inference, PyTorch state dict compatibility
モデル形式サポート: Safetensors、ONNX推論、PyTorchステートディクト互換 - ✅ Production Ready: 682 tests passing (100% success rate), unified error handling system
本番環境対応: 682個テスト合格(100%成功率)、統一エラーハンドリングシステム
Installation
Add this to your Cargo.toml
:
[]
= "0.4.0"
# Optional features
[]
= ["linalg"]
= ["rustorch/linalg"] # Linear algebra operations (SVD, QR, LU, eigenvalue)
= ["rustorch/cuda"]
= ["rustorch/metal"]
= ["rustorch/opencl"]
= ["rustorch/safetensors"]
= ["rustorch/onnx"]
= ["cuda", "metal", "opencl"]
= ["safetensors", "onnx"]
# To disable linalg features (avoid OpenBLAS/LAPACK dependencies):
= { = "0.4.0", = false }
📊 Performance / パフォーマンス
Latest benchmark results (実測値):
最新ベンチマーク結果(実測値):
🔥 Core Performance Metrics / コア性能指標
Operation / 演算 | Performance / 性能 | Details / 詳細 |
---|---|---|
Tensor Addition / テンソル加算 | 34K - 2.3M ops/sec | ✅ Broadcasting support / ブロードキャスト対応 |
Tensor Sum / テンソル合計 | 52M+ ops/sec | ✅ Consistently high performance / 一貫した高性能 |
Matrix Multiplication / 行列乗算 | 0.71 - 0.77 GFLOPS | ✅ Stable scaling / 安定したスケーリング |
Neural Network Inference / NN推論 | 15 - 60 inferences/sec | ✅ Batch processing / バッチ処理対応 |
🧮 Matrix Decomposition Performance / 行列分解パフォーマンス
Pure Rust implementation benchmarks (100 iterations) / 純Rust実装ベンチマーク (100回反復):
Matrix Size / 行列サイズ | SVD | QR | LU | Symeig | Eig |
---|---|---|---|---|---|
4×4 | 0.96 μs | 0.56 μs | 1.12 μs | 0.51 μs | 0.70 μs |
8×8 | 1.38 μs | 1.17 μs | 1.65 μs | 0.47 μs | 0.71 μs |
16×16 | 3.02 μs | 4.98 μs | 3.60 μs | 0.43 μs | 0.71 μs |
32×32 | 9.92 μs | 33.41 μs | 11.81 μs | 0.54 μs | 0.78 μs |
✅ 100% Success Rate: All matrix sizes and algorithms achieve 100/100 successful decompositions
✅ 100% 成功率: 全ての行列サイズ・アルゴリズムで100/100の分解成功
⚡ Detailed Performance Breakdown / 詳細性能内訳
Matrix Size | MatMul Performance | Batch Size | NN Inference Rate |
---|---|---|---|
64×64 | 0.77 GFLOPS | 32 | 59.86 inferences/sec |
128×128 | 0.76 GFLOPS | 64 | 29.35 inferences/sec |
256×256 | 0.76 GFLOPS | 128 | 15.09 inferences/sec |
512×512 | 0.71 GFLOPS | - | - |
🚀 System Status / システム状態
- ✅ 682 Tests Passing / 682個全テスト通過
- ✅ Zero Compilation Errors / コンパイルエラーゼロ
- ✅ Unified Error Handling / 統一エラーハンドリング
- ✅ Broadcasting Support / ブロードキャスト対応
- ✅ Matrix Decomposition / 行列分解対応
- ✅ Production Ready / 本番環境対応
🚀 Quick Start / クイックスタート
Basic Tensor Operations / 基本的なテンソル演算
use Tensor;
Broadcasting Support / ブロードキャスト対応
use Tensor;
Advanced Tensor Operations / 高度なテンソル演算
use Tensor;
🧮 Matrix Decomposition / 行列分解
⚠️ Important Note / 重要な注意:
Matrix decomposition features require the linalg
feature (enabled by default). On some systems, this may require OpenBLAS/LAPACK libraries to be installed. To avoid these dependencies, use:
行列分解機能は linalg
フィーチャーが必要です(デフォルト有効)。一部のシステムでは、OpenBLAS/LAPACKライブラリのインストールが必要な場合があります。これらの依存関係を避けるには:
= { = "0.4.0", = false }
SVD, QR, LU Decomposition and Eigenvalue Decomposition / SVD、QR、LU分解と固有値分解
use Tensor;
### Automatic Differentiation and Neural Networks / 自動微分とニューラルネットワーク
```rust
use *;
use ;
use ;
Computer Vision / コンピュータビジョン
Basic Transforms / 基本変換
use *;
use ;
Advanced Pipeline / 高度なパイプライン
use *;
Safe Operations and ReLU Activation / 安全な操作とReLU活性化
use SafeOps;
use Variable;
use Tensor;
GPU Acceleration / GPU加速
use ;
WebAssembly Support / WebAssemblyサポート
RusTorch provides comprehensive WebAssembly support for running neural networks in browsers with optimized performance and memory management.
RusTorchは、最適化されたパフォーマンスとメモリ管理でブラウザ内でニューラルネットワークを実行するための包括的なWebAssemblyサポートを提供します。
// Browser usage / ブラウザでの使用
import init * as rustorch from './pkg/rustorch.js';
;
Advanced WASM Features / 高度なWASM機能
// Browser storage integration / ブラウザストレージ統合
const storage = ;
// Save tensor to localStorage / テンソルをlocalStorageに保存
const my_tensor = rustorch.;
await storage.;
// Load tensor from localStorage / localStorageからテンソルを読み込み
const loaded_tensor = await storage.;
// Canvas visualization / Canvas可視化
const canvas_renderer = ;
const heatmap_data = rustorch.;
canvas_renderer.;
// Performance monitoring / パフォーマンス監視
rustorch.;
const result = model.;
rustorch.;
// Memory optimization / メモリ最適化
const memory_pool = ;
const optimized_ops = ;
// Fast matrix multiplication with blocking / ブロッキング付き高速行列乗算
const a = rustorch.;
const b = rustorch.;
const fast_result = optimized_ops.;
// Vectorized operations / ベクトル化操作
const vec_result = optimized_ops.;
// Batch processing / バッチ処理
const batch_processor = ;
batch_processor.;
batch_processor.;
const batch_results = batch_processor.;
// Web worker integration / Web Worker統合
const worker_manager = ;
await worker_manager.;
worker_manager.;
<!-- HTML Integration / HTML統合 -->
RusTorch WASM Demo
RusTorch WebAssembly Demo
Run Neural Network
Building for WebAssembly / WebAssembly向けビルド
# Install wasm-pack / wasm-packをインストール
|
# Build for web / Web向けビルド
# Build for Node.js / Node.js向けビルド
# Run examples / 例を実行
# Open http://localhost:8000/wasm_basic.html
🏗️ Architecture / アーキテクチャ
src/
├── tensor/ # Tensor operations (ndarray-based) / テンソル演算(ndarray基盤)
│ ├── operations.rs # Matrix decomposition (SVD, QR, LU, eigenvalue) / 行列分解(SVD、QR、LU、固有値)
│ ├── parallel_traits.rs # Parallel operation traits / 並列操作トレイト
│ ├── parallel_impl.rs # Parallel implementations / 並列実装
│ ├── parallel_ops.rs # Legacy parallel ops / レガシー並列操作
│ ├── gpu_parallel.rs # GPU-integrated parallel ops / GPU統合並列操作
│ ├── memory_optimized.rs # Memory optimization strategies / メモリ最適化戦略
│ ├── zero_copy.rs # Zero-copy operations / ゼロコピー操作
│ ├── simd_aligned.rs # SIMD-aligned tensors / SIMDアライメントテンソル
│ ├── math_ops.rs # Mathematical functions / 数学関数
│ ├── broadcasting.rs # Broadcasting operations / ブロードキャスト操作
│ ├── indexing.rs # Indexing and selection / インデックスと選択
│ └── statistics.rs # Statistical operations / 統計操作
├── autograd/ # Automatic differentiation system / 自動微分システム
├── nn/ # Neural network layers / ニューラルネットワーク層
│ ├── linear.rs # Linear layers / 線形層
│ ├── conv2d.rs # Convolution layers / 畳み込み層
│ ├── rnn.rs # RNN/LSTM/GRU
│ ├── activation.rs # Activation functions / 活性化関数
│ └── loss.rs # Loss functions / 損失関数
├── simd/ # SIMD optimizations / SIMD最適化
│ ├── vectorized.rs # AVX2/SSE4.1 operations / AVX2/SSE4.1演算
│ └── traits.rs # SIMD trait system / SIMDトレイトシステム
├── memory/ # Advanced memory management / 高度メモリ管理
├── gpu/ # GPU acceleration support / GPU加速サポート
│ ├── device.rs # Device management / デバイス管理
│ ├── memory.rs # GPU memory pools / GPUメモリプール
│ ├── kernels.rs # Unified kernel interface / 統一カーネルインターフェース
│ ├── cuda_kernels.rs # CUDA implementations with cuBLAS / cuBLAS統合CUDA実装
│ ├── metal_kernels.rs # Metal Performance Shaders / Metal Performance Shaders
│ ├── opencl_kernels.rs # OpenCL cross-platform kernels / OpenCLクロスプラットフォームカーネル
│ └── validation.rs # GPU kernel validation framework / GPUカーネル検証フレームワーク
├── wasm/ # WebAssembly support / WebAssemblyサポート
│ ├── tensor.rs # WASM tensor operations with enhanced math functions / 拡張数学関数付きWASMテンソル演算
│ ├── bindings.rs # Neural network layer bindings (Linear, ReLU, Model) / ニューラルネットワーク層バインディング(Linear、ReLU、Model)
│ ├── interop.rs # JavaScript interoperability and benchmarking / JavaScript相互運用とベンチマーク
│ ├── browser.rs # Browser-specific features (storage, canvas, workers) / ブラウザ専用機能(ストレージ、Canvas、Worker)
│ └── optimized.rs # Performance-optimized WASM operations / パフォーマンス最適化WASM操作
├── special/ # Special mathematical functions / 特殊数学関数
│ ├── gamma.rs # Gamma functions (Γ, ln Γ, ψ, B) / ガンマ関数(Γ、ln Γ、ψ、B)
│ ├── bessel.rs # Bessel functions (J, Y, I, K) / ベッセル関数(J、Y、I、K)
│ ├── error.rs # Error functions (erf, erfc, erfinv) / 誤差関数(erf、erfc、erfinv)
│ └── utils.rs # Utility functions / ユーティリティ関数
├── distributions/ # Statistical distributions / 統計分布
│ ├── normal.rs # Normal distribution / 正規分布
│ ├── gamma.rs # Gamma distribution / ガンマ分布
│ ├── beta.rs # Beta distribution / ベータ分布
│ └── ... # Other distributions / その他の分布
├── optim/ # Optimization algorithms / 最適化アルゴリズム
└── data/ # Data loaders / データローダー
📚 Rich Features / 豊富な機能
Tensor Operations / テンソル演算
- Basic operations / 基本演算:
+
,-
,*
,/
,matmul()
- Mathematical functions / 数学関数:
sin()
,cos()
,exp()
,log()
,sqrt()
,pow()
,sigmoid()
,tanh()
- Special functions / 特殊関数:
gamma()
,lgamma()
,digamma()
,erf()
,erfc()
,bessel_j()
,bessel_y()
,bessel_i()
,bessel_k()
- Statistical operations / 統計演算:
mean()
,var()
,std()
,median()
,quantile()
,cumsum()
,cov()
,corrcoef()
- Matrix decomposition / 行列分解:
svd()
,qr()
,lu()
,eig()
,symeig()
with PyTorch compatibility - Broadcasting / ブロードキャスティング:
broadcast_to()
,broadcast_with()
,unsqueeze()
,squeeze()
,repeat()
- Indexing / インデックス:
select()
, advanced slicing and tensor manipulation - Shape manipulation / 形状操作:
transpose()
,reshape()
,permute()
- Parallel operations / 並列操作: Trait-based parallel processing with automatic SIMD acceleration
- GPU operations / GPU操作: CUDA/Metal/OpenCL unified kernel execution with automatic device selection
- Memory optimization / メモリ最適化: Zero-copy views, SIMD-aligned allocation, memory pools
Neural Network Layers / ニューラルネットワーク層
- Linear: Fully connected layers / 全結合層
- Conv2d: 2D convolution layers / 2D畳み込み層
- RNN/LSTM/GRU: Recurrent neural networks (multi-layer & bidirectional) / 再帰ニューラルネットワーク(多層・双方向対応)
- Transformer: Complete transformer architecture with encoder/decoder / エンコーダー・デコーダー付き完全Transformerアーキテクチャ
- Multi-Head Attention: Self-attention and cross-attention mechanisms / セルフアテンション・クロスアテンション機構
- Embedding: Word embeddings, positional encoding, sinusoidal encoding / 単語埋め込み、位置エンコーディング、正弦波エンコーディング
- Normalization: BatchNorm, LayerNorm, GroupNorm, RMSNorm / バッチ正規化、レイヤー正規化、グループ正規化、RMS正規化
- Dropout: Standard and Alpha dropout layers / 標準・Alphaドロップアウト層
- Pooling: MaxPool2d, AvgPool2d
Activation Functions / 活性化関数
ReLU
, Sigmoid
, Tanh
, Softmax
, GELU
, Swish
, Mish
, LeakyReLU
, ELU
, SELU
Loss Functions / 損失関数
MSELoss
, CrossEntropyLoss
, BCELoss
, HuberLoss
Optimization Algorithms / 最適化アルゴリズム
SGD
, Adam
+ Learning rate schedulers / 学習率スケジューラー
📖 Examples / サンプル
Comprehensive examples in the examples/ directory:
examples/ ディレクトリに包括的なサンプルを用意:
- Tensor Operations / テンソル演算:
- math_ops_demo.rs - Mathematical functions demonstration
- broadcasting_demo.rs - Broadcasting operations
- indexing_demo.rs - Indexing and selection operations
- statistics_demo.rs - Statistical functions
- Matrix Decomposition / 行列分解:
- svd_demo.rs - SVD demonstration with verification and edge cases
- eigenvalue_demo.rs - Eigenvalue decomposition with PCA examples
- matrix_decomposition_demo.rs - QR/LU demonstrations with linear system solving
- Transformer & Attention / Transformer・アテンション:
- transformer_demo.rs - Complete transformer pipeline
- embedding_demo.rs - Word and positional embeddings
- attention_demo.rs - Multi-head attention mechanisms
- Special Functions / 特殊関数:
- special_functions_demo.rs - Gamma, Bessel, error functions demonstration
- Model Formats / モデル形式:
- model_formats_demo.rs - Safetensors, ONNX, PyTorch compatibility demonstration
- Performance Optimization / パフォーマンス最適化:
- parallel_operations_demo.rs - Parallel tensor operations with trait-based system
- memory_optimization_demo.rs - Advanced memory optimization strategies
- gpu_acceleration_demo.rs - GPU acceleration with multi-backend support
- gpu_kernel_demo.rs - GPU kernel validation and performance demonstration
- simd_demo.rs - SIMD vectorized operations
- Basic / 基本: tensor_demo.rs, autograd_demo.rs
- Neural Networks / NN: linear_regression.rs, neural_network_demo.rs
- Advanced / 高度: rnn_demo.rs, advanced_features_demo.rs
Running Examples / サンプル実行
# Run tensor operations examples / テンソル演算サンプル実行
# Run special functions examples / 特殊関数サンプル実行
# Run matrix decomposition examples / 行列分解サンプル実行
# Run transformer examples / Transformerサンプル実行
# Run performance optimization examples / パフォーマンス最適化サンプル実行
# Run neural network examples / ニューラルネットワークサンプル実行
# Run advanced examples / 高度なサンプル実行
🧪 Testing / テスト
All 682 tests passing - Production-ready quality assurance with unified error handling system
682個全テスト合格 - 統一エラーハンドリングシステム付き本番環境対応の品質保証
🧮 Matrix Decomposition Tests / 行列分解テスト
25 comprehensive matrix decomposition tests including:
包括的な25個の行列分解テスト含む:
- SVD (9 tests): Square matrices, rectangular matrices, identity matrices, rank-deficient cases, orthogonality verification
- Eigenvalue (8 tests): General matrices, symmetric matrices, eigenvector computation, identity and zero matrices
- QR (4 tests): Basic decomposition, rectangular matrices, identity matrices, error handling
- LU (4 tests): Basic decomposition, identity matrices, rectangular matrices, partial pivoting
All matrix decomposition algorithms achieve 100% success rate across all test cases.
全ての行列分解アルゴリズムが全テストケースで100%成功率を達成。
# Run all tests / 全テスト実行
# Run with release optimizations / リリース最適化でテスト実行
# Run specific test modules / 特定のテストモジュール実行
📊 Benchmarks / ベンチマーク
Comprehensive performance measurement with dedicated benchmark suites:
専用ベンチマークスイートで包括的な性能測定:
# Run all benchmarks / 全ベンチマーク実行
# Run specific benchmark suites / 特定のベンチマークスイート実行
# Matrix decomposition benchmarks / 行列分解ベンチマーク
# Legacy benchmarks / レガシーベンチマーク
New Benchmark Suites / 新しいベンチマークスイート:
parallel_performance
: Parallel vs sequential operations, thread scaling, execution strategies / 並列vs逐次演算、スレッドスケーリング、実行戦略simd_performance
: SIMD vs scalar operations, vectorization effectiveness, instruction sets / SIMDvsスカラー演算、ベクトル化効果、命令セットmemory_strategy_performance
: Memory allocation strategies, zero-copy operations, cache optimization / メモリ割り当て戦略、ゼロコピー操作、キャッシュ最適化gpu_cpu_performance
: GPU acceleration vs CPU processing, device selection, memory transfer / GPU加速vsCPU処理、デバイス選択、メモリ転送integrated_performance
: End-to-end performance validation across all optimizations / 全最適化の統合パフォーマンス検証
Matrix Decomposition Benchmarks / 行列分解ベンチマーク:
matrix_decomposition_benchmark
: Comprehensive SVD, QR, LU, eigenvalue benchmarks with scaling analysis / SVD、QR、LU、固有値の包括的ベンチマークとスケーリング解析optimized_matrix_benchmark
: Timeout-resistant benchmarks with conservative settings / タイムアウト耐性の保守的設定ベンチマークquick_matrix_benchmark
: Fast matrix operation benchmarks for development / 開発用高速行列演算ベンチマーク
Legacy Benchmark Categories / レガシーベンチマークカテゴリ:
tensor_ops
: Basic tensor operations / 基本テンソル演算autograd_ops
: Automatic differentiation operations / 自動微分演算neural_networks
: Neural network operations / ニューラルネットワークoptimized_ops
: SIMD and parallel optimizations / SIMD・並列最適化memory_pool
: Memory management performance / メモリ管理性能memory_optimization
: Advanced memory strategies / 高度メモリ戦略gpu_integration
: GPU acceleration benchmarks / GPU加速ベンチマーク
📖 Documentation / ドキュメント
For detailed API documentation, please refer to docs.rs/rustorch.
詳細なAPIドキュメントは docs.rs/rustorch をご覧ください。
🚀 Production Deployment / 本番環境デプロイ
Docker Deployment
RusTorch provides production-ready Docker images with multi-stage builds for optimal performance:
# Production deployment
# GPU-enabled deployment (requires NVIDIA Docker)
# Development environment
# Complete multi-service stack
CI/CD Pipeline
Automated testing and deployment through GitHub Actions:
- Multi-platform Testing: Ubuntu, macOS, Windows across Rust stable/beta/nightly
- Code Quality: Rustfmt, Clippy, security audits, dependency reviews
- Performance Regression: Automated benchmark comparisons
- Security Scanning: Trivy vulnerability scanning, CodeQL analysis
- Documentation: Auto-generated and deployed to GitHub Pages
- Release Automation: Automated crates.io publishing on releases
Production Features
- Memory Safety: Zero unsafe code in core functionality
- Thread Safety: Full concurrent operation support
- Error Handling: Comprehensive error types and recovery
- Monitoring: Built-in performance metrics and logging
- Scalability: Horizontal scaling with distributed computing support
- Security: Regular dependency audits and vulnerability scanning
🏗️ Architecture Overview / アーキテクチャ概要
🏢 Production Stack
├── 🚀 Application Layer
│ ├── High-level APIs (Sequential, Trainer)
│ ├── Model definitions (CNN, RNN, Transformer)
│ └── Training loops and inference
├── 🧠 Neural Network Layer
│ ├── Core layers (Linear, Conv2d, Attention)
│ ├── Activation functions (ReLU, Softmax, GELU)
│ └── Normalization (BatchNorm, LayerNorm)
├── 🔧 Computation Engine
│ ├── Tensor operations (Math, Broadcasting)
│ ├── Automatic differentiation (Backprop)
│ └── Memory management (Pools, Zero-copy)
├── ⚡ Optimization Layer
│ ├── SIMD vectorization (AVX2, SSE4.1)
│ ├── Parallel processing (Rayon threading)
│ └── GPU acceleration (CUDA, Metal, OpenCL)
└── 🏗️ Infrastructure Layer
├── Cross-platform support (Linux, macOS, Windows)
├── WebAssembly bindings (Browser deployment)
└── Docker containerization (Production-ready)
🤝 Contributing / コントリビューション
We welcome contributions from the community! Here are some areas where your help would be especially valuable:
Priority Areas / 優先領域
- 🎯 Special Functions Precision: Improve numerical accuracy of Bessel functions, error functions, and gamma functions
- ⚡ Performance Optimization: SIMD improvements, GPU kernel optimization, memory management
- 🧪 Testing: Add more comprehensive test cases, edge case handling, numerical stability tests
- 📚 Documentation: Examples, tutorials, API documentation improvements
- 🌐 Platform Support: WebAssembly optimizations, mobile platforms, embedded systems
- 🔧 Algorithm Implementations: New neural network layers, optimizers, loss functions
Special Functions Improvements Needed / 特殊関数の改善が必要
- Bessel Functions: Current Y₀(x) implementation has significant precision issues
- Error Functions: erfinv/erfcinv precision could be improved from 1e-5 to 1e-10
- Numerical Stability: Bessel function recurrence relations need stabilization
How to Contribute / コントリビューション方法
- Fork the repository and create a feature branch
- Write comprehensive tests for your changes
- Ensure all tests pass:
cargo test --all-features
- Follow Rust best practices and maintain zero unsafe code in core functionality
- Add documentation for public APIs
- Submit a pull request with a clear description
Development Setup / 開発環境セットアップ
# Clone the repository
# Run tests
# Run benchmarks
# Check formatting
# Run clippy
We appreciate all contributions, from bug fixes to major feature additions! すべてのコントリビューション(バグ修正から主要機能追加まで)を歓迎します!
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.