主な変更: - nyash.toml v2形式(マルチBox型プラグイン)に完全対応 - plugin-testerをv2対応に全面更新 - Host VTable完全廃止でシンプル化 - init関数をオプション化(グローバル初期化用) - FileBoxプラグインを新設計に移行(once_cell使用) 仕様更新: - nyash_plugin_invoke(必須)とnyash_plugin_init(オプション)の2関数体制 - すべてのメタ情報はnyash.tomlから取得 - プラグインは自己完結でログ出力 テスト確認: - plugin-testerでFileBoxの動作確認済み - birth/finiライフサイクル正常動作 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.1 KiB
TOML
38 lines
1.1 KiB
TOML
# Nyash Configuration File v2
|
||
# マルチBox型プラグイン対応
|
||
|
||
[libraries]
|
||
# ライブラリ定義(1つのプラグインで複数のBox型を提供可能)
|
||
[libraries."libnyash_filebox_plugin.so"]
|
||
boxes = ["FileBox"]
|
||
path = "./plugins/nyash-filebox-plugin/target/release/libnyash_filebox_plugin.so"
|
||
|
||
# 将来の拡張例:
|
||
# "libnyash_database_plugin.so" = {
|
||
# boxes = ["PostgreSQLBox", "MySQLBox", "SQLiteBox"],
|
||
# path = "./target/release/libnyash_database_plugin.so"
|
||
# }
|
||
|
||
# FileBoxの型情報定義
|
||
[libraries."libnyash_filebox_plugin.so".FileBox]
|
||
type_id = 6
|
||
|
||
[libraries."libnyash_filebox_plugin.so".FileBox.methods]
|
||
# 全メソッドをmethod_idと共に定義
|
||
birth = { method_id = 0 }
|
||
open = { method_id = 1, args = ["path", "mode"] }
|
||
read = { method_id = 2 }
|
||
write = { method_id = 3, args = ["data"] }
|
||
close = { method_id = 4 }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
[plugin_paths]
|
||
# プラグインの検索パス(デフォルト)
|
||
search_paths = [
|
||
"./target/release",
|
||
"./target/debug",
|
||
"./plugins/*/target/release",
|
||
"./plugins/*/target/debug",
|
||
"/usr/local/lib/nyash/plugins",
|
||
"~/.nyash/plugins"
|
||
] |