Commit Graph

3 Commits

Author SHA1 Message Date
27ce63e33c Phase 10.1: Zero-Copy Detection APIs Implementation Complete
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-15 06:06:41 +00:00
44049835d1 🐛 fix: コンパイルエラーを修正
主な修正内容:
- ArrayBox/RegexBox/JSONBoxで`push`メソッドの戻り値を適切に処理
- BufferBoxのインポートパスを修正(buffer::BufferBox)
- StreamBoxでArrayBoxを正しくインポート
- HTTPClientBoxをスタブ実装に変更(reqwest依存を一時的に無効化)

テストプログラムも追加:
- test_array_box_simple.nyash: ArrayBoxの基本テスト
- test_new_boxes.nyash: 全Box実装の統合テスト

NOTE: HTTPサポートは現在OpenSSL/pkg-config依存のため一時的に無効化。
将来的にはrustls等の純Rust実装への移行を検討。

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:18:21 +09:00
750543be7c 🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装

各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split

interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox

これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00