- nyash.tomlからすべての.so拡張子を削除 - plugin_loader_v2のresolve_library_pathが自動的に適切な拡張子を追加 - Linux: .so - Windows: .dll - macOS: .dylib - クロスプラットフォーム対応の準備完了
220 lines
6.9 KiB
TOML
220 lines
6.9 KiB
TOML
# Nyash Configuration File v2
|
||
# マルチBox型プラグイン対応
|
||
|
||
[libraries]
|
||
# ライブラリ定義(1つのプラグインで複数のBox型を提供可能)
|
||
[libraries."libnyash_filebox_plugin"]
|
||
boxes = ["FileBox"]
|
||
path = "./plugins/nyash-filebox-plugin/target/release/libnyash_filebox_plugin"
|
||
|
||
[libraries."libnyash_counter_plugin"]
|
||
boxes = ["CounterBox"]
|
||
path = "./plugins/nyash-counter-plugin/target/release/libnyash_counter_plugin"
|
||
|
||
[libraries."libnyash_net_plugin"]
|
||
boxes = ["HttpServerBox", "HttpClientBox", "HttpResponseBox", "HttpRequestBox", "SocketServerBox", "SocketClientBox", "SocketConnBox"]
|
||
path = "./plugins/nyash-net-plugin/target/release/libnyash_net_plugin"
|
||
|
||
# FileBoxの型情報定義
|
||
[libraries."libnyash_filebox_plugin".FileBox]
|
||
type_id = 6
|
||
|
||
[libraries."libnyash_filebox_plugin".FileBox.methods]
|
||
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 }
|
||
copyFrom = { method_id = 7, args = [ { kind = "box", category = "plugin" } ] }
|
||
cloneSelf = { method_id = 8 }
|
||
|
||
[libraries."libnyash_counter_plugin".CounterBox]
|
||
type_id = 7
|
||
singleton = true
|
||
|
||
[libraries."libnyash_counter_plugin".CounterBox.methods]
|
||
birth = { method_id = 0 }
|
||
inc = { method_id = 1 }
|
||
get = { method_id = 2 }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# HttpServerBox
|
||
[libraries."libnyash_net_plugin".HttpServerBox]
|
||
type_id = 20
|
||
|
||
[libraries."libnyash_net_plugin".HttpServerBox.methods]
|
||
birth = { method_id = 0 }
|
||
start = { method_id = 1, args = ["port"], returns_result = true }
|
||
stop = { method_id = 2, returns_result = true }
|
||
accept = { method_id = 3, returns_result = true }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# HttpClientBox
|
||
[libraries."libnyash_net_plugin".HttpClientBox]
|
||
type_id = 23
|
||
|
||
[libraries."libnyash_net_plugin".HttpClientBox.methods]
|
||
birth = { method_id = 0 }
|
||
get = { method_id = 1, args = ["url"], returns_result = true }
|
||
post = { method_id = 2, args = ["url", "body"], returns_result = true }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# HttpResponseBox
|
||
[libraries."libnyash_net_plugin".HttpResponseBox]
|
||
type_id = 22
|
||
|
||
[libraries."libnyash_net_plugin".HttpResponseBox.methods]
|
||
birth = { method_id = 0 }
|
||
setStatus = { method_id = 1, args = ["status"] }
|
||
setHeader = { method_id = 2, args = ["key", "value"] }
|
||
write = { method_id = 3, args = ["body"] }
|
||
readBody = { method_id = 4 }
|
||
getStatus = { method_id = 5 }
|
||
getHeader = { method_id = 6, args = ["key"] }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# HttpRequestBox
|
||
[libraries."libnyash_net_plugin".HttpRequestBox]
|
||
type_id = 21
|
||
|
||
[libraries."libnyash_net_plugin".HttpRequestBox.methods]
|
||
birth = { method_id = 0 }
|
||
path = { method_id = 1 }
|
||
readBody = { method_id = 2 }
|
||
respond = { method_id = 3, args = [{ kind = "box", category = "plugin" }] }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# SocketServerBox
|
||
[libraries."libnyash_net_plugin".SocketServerBox]
|
||
type_id = 30
|
||
|
||
[libraries."libnyash_net_plugin".SocketServerBox.methods]
|
||
birth = { method_id = 0 }
|
||
bind = { method_id = 1, args = ["port"] }
|
||
accept = { method_id = 2 }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# SocketClientBox
|
||
[libraries."libnyash_net_plugin".SocketClientBox]
|
||
type_id = 32
|
||
|
||
[libraries."libnyash_net_plugin".SocketClientBox.methods]
|
||
birth = { method_id = 0 }
|
||
connect = { method_id = 1, args = ["host", "port"] }
|
||
send = { method_id = 2, args = ["data"] }
|
||
receive = { method_id = 3 }
|
||
close = { method_id = 4 }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# SocketConnBox
|
||
[libraries."libnyash_net_plugin".SocketConnBox]
|
||
type_id = 31
|
||
|
||
[libraries."libnyash_net_plugin".SocketConnBox.methods]
|
||
birth = { method_id = 0 }
|
||
send = { method_id = 1, args = ["data"] }
|
||
recv = { method_id = 2 }
|
||
close = { method_id = 3 }
|
||
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"
|
||
]
|
||
[libraries."libnyash_array_plugin"]
|
||
boxes = ["ArrayBox"]
|
||
path = "./plugins/nyash-array-plugin/target/release/libnyash_array_plugin"
|
||
|
||
[libraries."libnyash_array_plugin".ArrayBox]
|
||
type_id = 10
|
||
|
||
[libraries."libnyash_array_plugin".ArrayBox.methods]
|
||
birth = { method_id = 0 }
|
||
length = { method_id = 1 }
|
||
get = { method_id = 2, args = ["index"] }
|
||
push = { method_id = 3, args = ["value"] }
|
||
set = { method_id = 4, args = ["index", "value"] }
|
||
fini = { method_id = 4294967295 }
|
||
[libraries."libnyash_map_plugin"]
|
||
boxes = ["MapBox"]
|
||
path = "./plugins/nyash-map-plugin/target/release/libnyash_map_plugin"
|
||
|
||
[libraries."libnyash_map_plugin".MapBox]
|
||
type_id = 11
|
||
|
||
[libraries."libnyash_map_plugin".MapBox.methods]
|
||
birth = { method_id = 0 }
|
||
size = { method_id = 1 }
|
||
get = { method_id = 2, args = ["key"] }
|
||
has = { method_id = 3, args = ["key"] }
|
||
set = { method_id = 4, args = ["key", "value"] }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# IntegerBox plugin (basic numeric box)
|
||
[libraries."libnyash_integer_plugin"]
|
||
boxes = ["IntegerBox"]
|
||
path = "./plugins/nyash-integer-plugin/target/release/libnyash_integer_plugin"
|
||
|
||
[libraries."libnyash_integer_plugin".IntegerBox]
|
||
type_id = 12
|
||
|
||
[libraries."libnyash_integer_plugin".IntegerBox.methods]
|
||
birth = { method_id = 0 }
|
||
get = { method_id = 1 }
|
||
set = { method_id = 2, args = ["value"] }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# StringBox plugin (read-only methods first)
|
||
[libraries."libnyash_string_plugin"]
|
||
boxes = ["StringBox"]
|
||
path = "./plugins/nyash-string-plugin/target/release/libnyash_string_plugin"
|
||
|
||
[libraries."libnyash_string_plugin".StringBox]
|
||
type_id = 13
|
||
|
||
[libraries."libnyash_string_plugin".StringBox.methods]
|
||
birth = { method_id = 0 }
|
||
length = { method_id = 1 }
|
||
is_empty = { method_id = 2 }
|
||
charCodeAt = { method_id = 3, args = ["index"] }
|
||
concat = { method_id = 4, args = ["other"] }
|
||
fromUtf8 = { method_id = 5, args = ["data"] }
|
||
fini = { method_id = 4294967295 }
|
||
|
||
# Python plugin (Phase 10.5 – Embedding & FFI, initial scaffold)
|
||
[libraries."libnyash_python_plugin"]
|
||
boxes = ["PyRuntimeBox", "PyObjectBox"]
|
||
path = "./plugins/nyash-python-plugin/target/release/libnyash_python_plugin"
|
||
|
||
[libraries."libnyash_python_plugin".PyRuntimeBox]
|
||
type_id = 40
|
||
|
||
[libraries."libnyash_python_plugin".PyRuntimeBox.methods]
|
||
birth = { method_id = 0 }
|
||
eval = { method_id = 1, args = ["code"] }
|
||
import = { method_id = 2, args = ["name"] }
|
||
fini = { method_id = 4294967295 }
|
||
evalR = { method_id = 11, args = ["code"], returns_result = true }
|
||
importR= { method_id = 12, args = ["name"], returns_result = true }
|
||
|
||
[libraries."libnyash_python_plugin".PyObjectBox]
|
||
type_id = 41
|
||
|
||
[libraries."libnyash_python_plugin".PyObjectBox.methods]
|
||
birth = { method_id = 0 }
|
||
getattr = { method_id = 1, args = ["name"] }
|
||
call = { method_id = 2, args = ["args"] }
|
||
callKw = { method_id = 5 }
|
||
str = { method_id = 3 }
|
||
fini = { method_id = 4294967295 }
|
||
getattrR= { method_id = 11, args = ["name"], returns_result = true }
|
||
callR = { method_id = 12, args = ["args"], returns_result = true }
|
||
callKwR = { method_id = 15, returns_result = true }
|