refactor: 大型プラグインのモジュール分割によるコード品質向上

nyash-json-plugin:
- 796行の単一ファイルから6モジュール構造へ分割
- constants.rs, provider.rs, doc_box.rs, node_box.rs, tlv_helpers.rs, ffi.rsに責任分離
- 最大ファイルサイズを374行に削減(53%削減)
- 共有状態管理をprovider.rsに集約

nyash-net-plugin:
- 1112行の巨大ファイルから17ファイル構造へ分割
- boxesサブディレクトリでBox実装を整理(server, client, request, response, socket系)
- 最大ファイルサイズを290行に削減(74%削減)
- logging, tlv, http_helpers等の共通機能を独立モジュール化

両プラグインともビルド成功確認済み、完全な後方互換性を維持

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Selfhosting Dev
2025-09-25 01:57:12 +09:00
parent 824ca600ea
commit b4f6818f3b
26 changed files with 1980 additions and 1863 deletions

View File

@ -8,11 +8,11 @@ use std::sync::{
use std::time::Duration;
use crate::consts::*;
use crate::logging::net_log;
use crate::state::{self, SockConnState, SockServerState};
// Utilities provided by parent module
fn logf(s: String) {
super::net_log(&s);
net_log(&s);
}
pub(crate) unsafe fn sock_server_invoke(