Files
hakorune/nyash.toml
Moe Charm c6c3c8e2f9 fix(bid-ffi): Fix HostVtable lifetime issue causing segfault
🚨 Critical memory safety fix:
- HostVtable was created on stack and destroyed after init
- Plugin stored reference to destroyed memory → NULL pointer access
- Changed to static LazyLock storage for lifetime safety

 Results:
- Segfault completely eliminated
- Plugin logging now works properly
- Type info system confirmed working
- Full E2E FileBox plugin operation successful

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 14:10:41 +09:00

39 lines
1.0 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Nyash Configuration File
# プラグインによるBox実装の置き換え設定
[plugins]
# FileBoxをプラグイン版に置き換え
FileBox = "nyash-filebox-plugin"
# 他のBoxはビルトインを使用コメントアウト = ビルトイン)
# StringBox = "my-string-plugin"
# IntegerBox = "my-integer-plugin"
# FileBoxの型情報定義
[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" }
[plugin_paths]
# プラグインの検索パス(デフォルト)
search_paths = [
"./plugins/*/target/release",
"./plugins/*/target/debug",
"/usr/local/lib/nyash/plugins",
"~/.nyash/plugins"
]