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