- plugin_loader_v2: store per-Box resolve() from TypeBox FFI; add resolve_method_id() and use in invoke_instance_method
- plugin_loader_unified: resolve_method() falls back to loader’s resolve when TOML lacks method entries
- nyash.toml: register JsonDocBox/JsonNodeBox methods (birth/parse/root/error; kind/get/size/at/str/int/bool)
- plugins/nyash-json-plugin:
* serde/yyjson provider switch via env NYASH_JSON_PROVIDER (default serde)
* vendored yyjson (c/yyjson) + shim; parse/root/get/size/at/str/int/bool implemented for yyjson
* TLV void returns aligned to tag=9
- PyVM: add minimal JsonDocBox/JsonNodeBox shims in ops_box.py (for dev path)
- tests/smokes: add jsonbox_{parse_ok,parse_err,nested,collect_prints}; wire two into min-gate CI
- tools: collect_prints_mixed now uses JSON-based app
- MiniVmPrints: move BinaryOp and fallback heuristics behind a dev toggle (default OFF)
- CURRENT_TASK.md: updated with provider policy and fallback stance
82 lines
1.4 KiB
TOML
82 lines
1.4 KiB
TOML
[box]
|
|
name = "JsonPlugin"
|
|
version = "0.1.0"
|
|
description = "JSON parsing and traversal via Nyash TypeBox v2 (serde_json backend)"
|
|
author = "Nyash Team"
|
|
|
|
[provides]
|
|
boxes = ["JsonDocBox", "JsonNodeBox"]
|
|
|
|
[JsonDocBox]
|
|
type_id = 70
|
|
|
|
[JsonDocBox.lifecycle]
|
|
birth = { id = 0 }
|
|
fini = { id = 4294967295 }
|
|
|
|
[JsonDocBox.methods.parse]
|
|
id = 1
|
|
args = [{ type = "string" }]
|
|
returns = { type = "void" }
|
|
|
|
[JsonDocBox.methods.root]
|
|
id = 2
|
|
args = []
|
|
returns = { type = "handle", box = "JsonNodeBox" }
|
|
|
|
[JsonDocBox.methods.error]
|
|
id = 3
|
|
args = []
|
|
returns = { type = "string" }
|
|
|
|
[JsonNodeBox]
|
|
type_id = 71
|
|
|
|
[JsonNodeBox.lifecycle]
|
|
birth = { id = 0 }
|
|
fini = { id = 4294967295 }
|
|
|
|
[JsonNodeBox.methods.kind]
|
|
id = 1
|
|
args = []
|
|
returns = { type = "string" }
|
|
|
|
[JsonNodeBox.methods.get]
|
|
id = 2
|
|
args = [{ type = "string" }]
|
|
returns = { type = "handle", box = "JsonNodeBox" }
|
|
|
|
[JsonNodeBox.methods.size]
|
|
id = 3
|
|
args = []
|
|
returns = { type = "i64" }
|
|
|
|
[JsonNodeBox.methods.at]
|
|
id = 4
|
|
args = [{ type = "i64" }]
|
|
returns = { type = "handle", box = "JsonNodeBox" }
|
|
|
|
[JsonNodeBox.methods.str]
|
|
id = 5
|
|
args = []
|
|
returns = { type = "string" }
|
|
|
|
[JsonNodeBox.methods.int]
|
|
id = 6
|
|
args = []
|
|
returns = { type = "i64" }
|
|
|
|
[JsonNodeBox.methods.bool]
|
|
id = 7
|
|
args = []
|
|
returns = { type = "bool" }
|
|
|
|
[implementation]
|
|
ffi_version = 1
|
|
thread_safe = true
|
|
|
|
[artifacts]
|
|
linux = "target/release/libnyash_json_plugin.so"
|
|
macos = "target/release/libnyash_json_plugin.dylib"
|
|
|