feat(phase-9.75g-0): Complete BID-FFI Plugin System with enhanced plugin-tester

🎊 Phase 9.75g-0 COMPLETE - Revolutionary Plugin System Achievement\!

 Major Completions:
- plugin-tester type validation: nyash.toml integration & method signature verification
- Duplicate method name detection: Enforces Nyash no-overloading policy
- Comprehensive developer guide: 200+ line technical documentation
- Memory safety: HostVtable lifetime issues resolved with LazyLock
- Type information system: External nyash.toml configuration eliminates hardcoded conversions

🚀 Revolutionary Impact:
Nyash now supports dynamic Box type extension via plugins:
```nyash
local file = new FileBox()        // Plugin-provided
local db = new PostgreSQLBox()    // Future: Plugin-provided
local gpu = new CudaBox()         // Future: Plugin-provided
```

📊 Technical Achievements:
- plugin-tester: 4 comprehensive validation modes (check/lifecycle/io/typecheck)
- BID-FFI Protocol: Production-ready with valgrind-verified memory safety
- Type conversion: Automatic string→bytes mapping via nyash.toml
- Method validation: Prevents overloading conflicts in plugin development

🎯 Next Priority: Phase 8.6 VM Performance Improvement
Current issue: VM is 0.9x slower than interpreter (regression\!)
Target: 2x+ speedup for practical VM execution

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm
2025-08-18 16:04:30 +09:00
parent c6c3c8e2f9
commit bfb2d648d5
4 changed files with 814 additions and 581 deletions

29
test-nyash.toml Normal file
View File

@ -0,0 +1,29 @@
# Test Configuration for plugin-tester
# Valid TOML structure
# Plugin name mappings (simple version)
[plugin_names]
FileBox = "nyash-filebox-plugin"
# Plugin configurations with method type information
[plugins.FileBox]
plugin_name = "nyash-filebox-plugin"
[plugins.FileBox.methods]
# readは引数なし
read = { args = [] }
# writeは文字列をbytesとして送る
write = { args = [{ from = "string", to = "bytes" }] }
# openは2つの文字列引数
open = { args = [
{ name = "path", from = "string", to = "string" },
{ name = "mode", from = "string", to = "string" }
] }
# closeは引数なし、戻り値なし
close = { args = [] }
# existsは引数なし、戻り値はbool将来拡張
exists = { args = [], returns = "bool" }