rufio 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aff3f0a1c50ec0a854769b6cd89a559872db6edd9618fe000e80a89160018887
4
- data.tar.gz: 244a77b3555472fccecfe13638ae53f72bc971f6cbc3649ded6bd09a127b4004
3
+ metadata.gz: 6d9ba235b051414a23404dd8afdd87f292aef48b07f89612e57f0fcb2c0c99b0
4
+ data.tar.gz: e9a9273be387d14026c35cd36f7f9d805c0a951814e935f883d4138b0fe302d3
5
5
  SHA512:
6
- metadata.gz: 59dbee8f1030310696f3f113c85ebc9f6ed236e7ce24ca0fc834a174f3614b2f609dc7c5471efd905d113b8d61d490779da8222c7984c3827c095d1ff0c14d67
7
- data.tar.gz: a75e8048e9b6ddaf81d32d7fc772a6231462a9e81e221147329c8726ef59d65e63ecd115397f80dbd8274ced4b3a5b14d3d3d2a5c3cd247b36d8d1275518595c
6
+ metadata.gz: 25e64b32573b24ab97c7719c4a3a0ead75e1d6f7965732c6b71ffe6dd753786413f346247ec835d8774ad3333a51caed21efca9b8cc0ee010a4d8944f4d72014
7
+ data.tar.gz: 3021168e7cb48ffa747d32416a7d24379fd2f8155998a6a74ff6734703818c525bacb1ee545033e65334c1f6b340fbdb49969354ba5ff6c6620bec71f716bb89
data/CHANGELOG.md CHANGED
@@ -7,6 +7,71 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.34.0] - 2026-01-10
11
+
12
+ ### Added
13
+ - **🚀 Async Scanner Architecture**: Complete async/parallel scanning implementation
14
+ - **Phase 1: Basic Async Scan**
15
+ - Zig pthread-based threading implementation
16
+ - State management (idle → scanning → done/cancelled/failed)
17
+ - Polling-based completion with progress tracking
18
+ - **Phase 2: Progress Reporting**
19
+ - Real-time progress API with mutex protection
20
+ - Thread-safe cancellation support
21
+ - Timeout handling for scan operations
22
+ - **Phase 3: Advanced Features**
23
+ - Promise-style interface with method chaining
24
+ - Fiber integration with Async library
25
+ - Parallel scanner with thread pool optimization
26
+ - **💎 AsyncScannerPromise**: Promise-style interface
27
+ - Method chaining with `.then()` callbacks
28
+ - Automatic resource cleanup on completion
29
+ - Works with both Ruby and Zig backends
30
+ - **🧵 AsyncScannerFiberWrapper**: Async/Fiber integration
31
+ - Non-blocking I/O with Ruby's Async library
32
+ - Concurrent scanning support
33
+ - Progress reporting with fiber-aware sleep
34
+ - **⚡ ParallelScanner**: Parallel scanning optimization
35
+ - Thread pool management (configurable max_workers)
36
+ - Batch directory scanning with result merging
37
+ - Error handling with partial failure support
38
+ - Backend switching (Ruby/Zig)
39
+ - **⚡ Zig Native Scanner**: Experimental implementation with minimal binary size (52.6 KB)
40
+ - Direct Ruby C API integration (no FFI overhead)
41
+ - Competitive performance (within 6% of fastest implementations)
42
+ - 5.97x smaller than Rust/Magnus implementation
43
+ - Async-ready handle-based design
44
+ - **📊 YJIT Performance Analysis**: Comprehensive benchmarking of JIT compiler impact
45
+ - Pure Ruby: 2-5% improvement with YJIT
46
+ - Native extensions: No significant impact
47
+ - **📈 Performance Documentation**: Extensive benchmarking suite and analysis
48
+ - 7 new benchmark scripts
49
+ - 4 detailed performance reports
50
+ - Complete implementation comparison
51
+
52
+ ### Fixed
53
+ - **🚨 CRITICAL: File Preview Performance Bug**: Fixed severe rendering delays (80ms → 1-2ms)
54
+ - Root cause: Redundant processing inside rendering loop (38x per frame)
55
+ - Impact: 97-99% improvement, 40-86x faster file preview
56
+ - All text file previews now render in < 2ms
57
+ - **🔧 Zig Cancellation Handling**: Fixed cancelled state not properly propagating
58
+ - Changed error handling to preserve cancellation state
59
+ - Prevents "failed" state when scan is intentionally cancelled
60
+
61
+ ### Changed
62
+ - **Ruby 4.0 Compatibility**: Added `fiddle` gem dependency (required in Ruby 4.0+)
63
+ - **Async Library Integration**: Deprecated API warnings resolved
64
+ - Updated to use `Kernel#sleep` instead of `Async::Task#sleep`
65
+
66
+ ### Technical Details
67
+ - **Test Coverage**: 483 tests, 1899 assertions (100% pass rate)
68
+ - **Async Scanner Tests**: 8 fiber tests, 10 promise tests, 10 parallel tests
69
+ - **Ruby ABI Independence**: Handle-based design (u64) avoids Ruby ABI coupling
70
+ - **Thread Safety**: Pthread mutex protection for all shared state
71
+ - **GVL Freedom**: Native threads run independently of Ruby's GVL
72
+
73
+ For detailed information, see [CHANGELOG_v0.34.0.md](./docs/CHANGELOG_v0.34.0.md)
74
+
10
75
  ## [0.32.0] - 2026-01-02
11
76
 
12
77
  ### Added
data/README.md CHANGED
@@ -8,6 +8,14 @@ Ruby製のターミナルベースファイルマネージャー
8
8
 
9
9
  rufioは、Yaziにインスパイアされたターミナル上で動作するファイルマネージャーです。Rubyで実装されており、プラグインサポートを備えています。軽量で高速な操作性を提供し、ファイルの閲覧・管理・検索機能を備えています。
10
10
 
11
+ ### 🚀 v0.33.0の重要な更新
12
+
13
+ - **🚨 重大なパフォーマンス改善**: ファイルプレビューが40-86倍高速化(80ms → 1-2ms)
14
+ - **⚡ Zig実装追加**: 最小バイナリサイズ(52.6 KB)のネイティブスキャナー
15
+ - **📊 YJIT対応**: Ruby 3.4+ のJITコンパイラで全体的な性能向上
16
+
17
+ 詳細は [CHANGELOG v0.33.0](./docs/CHANGELOG_v0.33.0.md) を参照してください。
18
+
11
19
  ## 特徴
12
20
 
13
21
  - **軽量でシンプル**: Rubyで書かれた軽量なファイルマネージャー
@@ -18,7 +26,19 @@ rufioは、Yaziにインスパイアされたターミナル上で動作する
18
26
  - コマンド履歴(上下矢印キーでナビゲーション)
19
27
  - インテリジェントなTab補完(候補リスト表示)
20
28
  - Rubyプラグインによる拡張可能なコマンド
21
- - **ファイルプレビュー**: テキストファイルの内容をその場で確認
29
+ - **バックグラウンドコマンド実行** (v0.33.0):
30
+ - `:!command` でシェルコマンドを非同期実行
31
+ - 実行中もrufioの操作が可能
32
+ - 完了時に通知メッセージを表示
33
+ - 実行結果を自動的にログファイルに保存
34
+ - **実行ログビューワ** (v0.33.0):
35
+ - `L`キーでコマンド実行ログを閲覧
36
+ - ログファイルのタイムスタンプ付き管理
37
+ - ヘルプモードと同様の直感的なUI
38
+ - **高速ファイルプレビュー** (v0.33.0最適化):
39
+ - 大幅な性能改善(40-86倍高速化)
40
+ - 大規模ファイルも瞬時に表示(< 2ms)
41
+ - スムーズなスクロールと快適な操作性
22
42
  - **ファイル選択・操作**: 複数ファイルの選択、移動、コピー、削除が可能
23
43
  - **リアルタイムフィルター**: sキーでファイル名の絞り込み表示
24
44
  - **高度な検索機能**: fzfとrgaを使った強力な検索
@@ -52,7 +72,7 @@ rufio /path/to # 指定したディレクトリで起動
52
72
 
53
73
  ### ネイティブスキャナー(実験的機能)
54
74
 
55
- rufio v0.31.0以降では、高速なディレクトリスキャンのためのネイティブ実装(Rust/Go)をサポートしています。デフォルトは安定したRuby実装を使用し、オプションでネイティブ実装に切り替え可能です。
75
+ rufio v0.31.0以降では、高速なディレクトリスキャンのためのネイティブ実装(Rust/Go/Zig)をサポートしています。デフォルトは安定したRuby実装を使用し、オプションでネイティブ実装に切り替え可能です。
56
76
 
57
77
  #### 起動オプション
58
78
 
@@ -60,10 +80,13 @@ rufio v0.31.0以降では、高速なディレクトリスキャンのための
60
80
  # デフォルト(Ruby実装 - 安定)
61
81
  rufio
62
82
 
63
- # ネイティブ実装を有効化(自動検出: Rust > Go > Ruby)
83
+ # ネイティブ実装を有効化(自動検出: Magnus > Zig > Rust > Go > Ruby)
64
84
  rufio --native
65
85
  rufio --native=auto
66
86
 
87
+ # Zig実装を使用(v0.33.0 - 実験的)
88
+ rufio --native=zig
89
+
67
90
  # Rust実装を強制使用
68
91
  rufio --native=rust
69
92
  rufio --native rust /path/to/dir
@@ -73,21 +96,34 @@ rufio --native=go
73
96
  rufio --native go /path/to/dir
74
97
 
75
98
  # 環境変数でも制御可能
99
+ RUFIO_NATIVE=zig rufio
76
100
  RUFIO_NATIVE=rust rufio
77
101
  RUFIO_NATIVE=go rufio /path/to/dir
78
102
  ```
79
103
 
80
104
  #### ネイティブ実装について
81
105
 
82
- - **Rust実装**: 最も高速でメモリ安全。推奨。
83
- - **Go実装**: 高速で並行処理に優れる。
84
- - **Ruby実装** (デフォルト): 依存なし、安定動作保証。
106
+ - **Zig実装** (v0.33.0 - 実験的): 最小バイナリサイズ(52.6 KB)、高速、FFI不要
107
+ - **Magnus (Rust)**: 最速、メモリ安全、FFI不要(バイナリ: 314 KB)
108
+ - **Rust (FFI)**: 高速、メモリ安全、JSON経由
109
+ - **Go (FFI)**: 高速、並行処理に優れる
110
+ - **Ruby実装** (デフォルト): 依存なし、安定動作保証
111
+
112
+ **性能比較(163エントリ):**
113
+ - Go (FFI): 0.242 ms(最速)
114
+ - Pure Ruby + YJIT: 0.242 ms(同等)
115
+ - Rust (FFI): 0.244 ms
116
+ - Zig: 0.253 ms(最小バイナリ)
85
117
 
86
118
  #### ビルド方法
87
119
 
88
120
  ネイティブ実装を使用するには、事前にビルドが必要です:
89
121
 
90
122
  ```bash
123
+ # Zig実装のビルド(v0.33.0 - 実験的)
124
+ cd lib_zig/rufio_native
125
+ make
126
+
91
127
  # Rust実装のビルド
92
128
  cd lib_rust/scanner
93
129
  cargo build --release
@@ -98,6 +134,11 @@ cd lib_go/scanner
98
134
  make install
99
135
  ```
100
136
 
137
+ **必要な開発ツール:**
138
+ - Zig: Zig 0.15.2以降(`brew install zig` または https://ziglang.org/)
139
+ - Rust: Cargo(`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`)
140
+ - Go: Go 1.16以降(`brew install go` または https://golang.org/)
141
+
101
142
  #### 注意事項
102
143
 
103
144
  - ネイティブ実装は実験的機能です
@@ -174,7 +215,7 @@ rufio --help # ヘルプメッセージを表示
174
215
  | キー | 機能 |
175
216
  | --------- | ------------------------------------ |
176
217
  | `b` | 現在のディレクトリをブックマークに追加 |
177
- | `p` | プロジェクトモードに入る |
218
+ | `P` | プロジェクトモードに入る (v0.33.0で変更) |
178
219
  | `0` | 起動したディレクトリに移動 |
179
220
  | `1`-`9` | 対応する番号のブックマークに移動 |
180
221
 
@@ -202,11 +243,26 @@ rufio --help # ヘルプメッセージを表示
202
243
  :!pwd # 現在のディレクトリを表示
203
244
  ```
204
245
 
246
+ **バックグラウンド実行** (v0.33.0):
247
+ - `:!command` でシェルコマンドを非同期実行
248
+ - 実行中もrufioの操作が可能
249
+ - 完了時に通知メッセージを3秒間表示
250
+ - 実行結果は自動的に `~/.config/rufio/log/` に保存
251
+
205
252
  **Rubyコマンド** (v0.32.0):
206
253
  ```
207
254
  :hello # Hello プラグインを実行
208
255
  ```
209
256
 
257
+ #### ログビューワ (v0.33.0)
258
+
259
+ | キー | 機能 |
260
+ | ---- | ---------------------------------- |
261
+ | `L` | コマンド実行ログを閲覧 |
262
+ | `ESC`| ログビューワモードを終了 |
263
+
264
+ コマンド実行ログは `~/.config/rufio/log/` に保存され、`L`キーで閲覧できます。
265
+
210
266
  #### ヘルプ
211
267
 
212
268
  | キー | 機能 |
data/README_EN.md CHANGED
@@ -18,6 +18,15 @@ rufio is a terminal-based file manager inspired by Yazi. It's implemented in Rub
18
18
  - Command history (navigate with arrow keys)
19
19
  - Intelligent Tab completion (with candidate list display)
20
20
  - Extensible commands via Ruby plugins
21
+ - **Background Command Execution** (v0.33.0):
22
+ - Execute shell commands asynchronously with `:!command`
23
+ - rufio remains operational during execution
24
+ - Displays completion notification
25
+ - Automatically saves execution results to log files
26
+ - **Execution Log Viewer** (v0.33.0):
27
+ - View command execution logs with `L` key
28
+ - Timestamp-based log file management
29
+ - Intuitive UI similar to help mode
21
30
  - **File Preview**: View text file contents on the fly
22
31
  - **File Selection & Operations**: Select multiple files, move, copy, and delete
23
32
  - **Real-time Filter**: Filter files by name using f key
@@ -115,6 +124,7 @@ rufio --help # Show help message
115
124
  | Key | Function |
116
125
  | ------- | ------------------------------- |
117
126
  | `b` | Show bookmark menu |
127
+ | `P` | Enter project mode (Changed in v0.33.0) |
118
128
  | `1`-`9` | Go to corresponding bookmark |
119
129
 
120
130
  #### zoxide Integration
@@ -141,11 +151,26 @@ rufio --help # Show help message
141
151
  :!pwd # Print working directory
142
152
  ```
143
153
 
154
+ **Background Execution** (v0.33.0):
155
+ - Execute shell commands asynchronously with `:!command`
156
+ - rufio remains operational during execution
157
+ - Displays completion notification for 3 seconds
158
+ - Execution results automatically saved to `~/.config/rufio/log/`
159
+
144
160
  **Ruby Commands** (v0.32.0):
145
161
  ```
146
162
  :hello # Execute Hello plugin
147
163
  ```
148
164
 
165
+ #### Log Viewer (v0.33.0)
166
+
167
+ | Key | Function |
168
+ | ----- | ---------------------------- |
169
+ | `L` | View command execution logs |
170
+ | `ESC` | Exit log viewer mode |
171
+
172
+ Command execution logs are saved to `~/.config/rufio/log/` and can be viewed with the `L` key.
173
+
149
174
  #### System Operations
150
175
 
151
176
  | Key | Function |