# 📓 RusTorch Jupyter Documentation Hub
Central documentation hub for all RusTorch Jupyter environments and setups.
新規ユーザーがRusTorchを簡単にJupyterで使い始めるための統合ドキュメントハブです。
## 🚀 Quick Start / クイックスタート
```bash
# 1. Install / インストール
curl -sSL https://raw.githubusercontent.com/JunSuzukiJapan/rustorch/main/install_jupyter.sh | bash
# 2. Launch / 起動
rustorch-jupyter # Global command / グローバルコマンド
# または / or
./start_jupyter_quick.sh # Interactive menu / 対話式メニュー
# 3. Start coding! / コーディング開始!
```
**🎉 That's it! Your browser will open with Jupyter ready to use RusTorch!**
**🎉 これで完了!ブラウザでJupyterが開き、RusTorchを使う準備完了!**
---
## 🦀🐍 What You Get: Hybrid Environment (Default)
**🌟 最新機能**: Python + Rust デュアルカーネル環境がデフォルトに!
**Features / 機能:**
- 🐍 Python kernel with RusTorch bindings
- 🦀 Rust kernel (evcxr) for native performance
- 🔗 Seamless data exchange between languages
- ⚡ Auto-optimized for your hardware (CUDA/Metal/CPU)
## 📚 Complete Documentation / 完全ドキュメント
### 🇺🇸 English Documentation
- **[📖 Comprehensive Jupyter Guide](docs/en/jupyter-comprehensive-guide.md)** - Complete setup and usage guide
- **[🌐 WebGPU WASM Guide](docs/en/jupyter-guide.md)** - Browser GPU acceleration
- **[⚙️ WebAssembly Integration](jupyter/README.md)** - Technical WASM implementation
### 🇯🇵 日本語ドキュメント
- **[📖 包括的Jupyterガイド](docs/jupyter-comprehensive-guide-ja.md)** - 完全なセットアップと使用ガイド
- **[🌐 WebGPU WASMガイド](docs/jupyter-wasm-guide.md)** - ブラウザGPU加速
- **[⚙️ WebAssembly統合](jupyter/README.md)** - 技術的WASM実装
**🦀🚀 GPU対応Rustカーネル版(GPU加速 + Jupyter内で直接Rust実行):**
```bash
**標準版の特徴:**
- Python bindingsでJupyter使用
- CPU専用だが高速セットアップ
- 必要環境: Python 3.8+, Git
**WebGPU版の特徴:**
- ブラウザでGPU加速
- インタラクティブなWebGPUデモ
- Jupyter Lab + WebGPUデモサーバー
- 必要環境: Python 3.8+, Git, Rust, wasm-pack(自動インストール)
**Rustカーネル版の特徴:**
- Jupyter内で直接Rustコード実行
- ネイティブRustパフォーマンス
- 型安全性とゼロコスト抽象化
- 必要環境: Python 3.8+, Git, Rust(自動インストール)
**GPU対応Rustカーネル版の特徴:**
- 🎮 自動GPU検出(CUDA/Metal/OpenCL)
- 🚀 GPU加速されたテンソル演算
- 🧠 GPU対応ニューラルネットワーク
- ⚡ CPUとGPUの性能比較ベンチマーク
- 🔧 GPU機能の自動設定
- 必要環境: Python 3.8+, Git, Rust, GPU(自動検出)
---
## 🌐 Option 2: ブラウザで即座に試す(Binder)
[](https://mybinder.org/v2/gh/JunSuzukiJapan/rustorch/main?urlpath=lab)
**特徴:**
- インストール不要
- ブラウザだけで完全動作
- 5-10分で起動(初回のみ)
---
## 📚 利用可能なノートブック
1. **rustorch_demo.ipynb** - 基本的なテンソル操作
2. **webgpu_ml_demo.ipynb** - WebGPU加速デモ
3. **webgpu_performance_demo.ipynb** - パフォーマンスベンチマーク
---
## 🛠️ Manual Setup / 手動セットアップ
For advanced users who prefer manual installation:
上級者向けの手動インストール方法:
**📖 [Complete Manual Setup Guide](docs/en/jupyter-comprehensive-guide.md#manual-setup)**
**📖 [手動セットアップガイド](docs/jupyter-comprehensive-guide-ja.md#手動セットアップ)**
---
## 💡 トラブルシューティング
### 🚀 Rustカーネルを高速化(推奨)
初回実行が遅い場合、キャッシュを有効化すると大幅に高速化されます:
```bash
# キャッシュディレクトリを作成
mkdir -p ~/.config/evcxr
# 500MBキャッシュを有効化
echo ":cache 500" > ~/.config/evcxr/init.evcxr
```
**効果:**
- 初回:通常通りのコンパイル時間
- 2回目以降:依存ライブラリの再コンパイルなし(数倍高速)
- `rustorch`ライブラリも初回後はキャッシュされます
**注意:** ライブラリ更新後はJupyterのRustセルで`:clear_cache`実行を推奨
### Rustがインストールされていない場合
```bash
```
### Python仮想環境の問題
```bash
python3 -m pip install --user maturin jupyter
```
### macOS権限エラー
```bash
sudo xcode-select --install
```
---
## 🎮 サンプルコード
```python
import rustorch
# テンソル作成
x = rustorch.tensor([[1, 2], [3, 4]])
y = rustorch.tensor([[5, 6], [7, 8]])
# 行列乗算
result = rustorch.matmul(x, y)
print(result)
```
---
**🎉 数分でRusTorchのパワフルな機能をJupyterで体験できます!**