## 主な成果 - Nyashスクリプトでプラグイン作成可能という革命的発見 - C ABI制約の分析と埋め込みVMによる解決策 - MIR/VM/JIT層での箱引数サポートの詳細分析 ## ドキュメント作成 - Phase 12基本構想(README.md) - Gemini/Codex先生の技術分析 - C ABIとの整合性問題と解決策 - 埋め込みVM実装ロードマップ - 箱引数サポートの技術詳細 ## 重要な洞察 - 制約は「リンク時にC ABI必要」のみ - 埋め込みVMでMIRバイトコード実行により解決可能 - Nyashスクリプト→C ABIプラグイン変換が実現可能 Everything is Box → Everything is Plugin → Everything is Possible!
20 lines
482 B
Plaintext
20 lines
482 B
Plaintext
// Python minimal chain (VM): import -> getattr -> call
|
|
// @env NYASH_PLUGIN_ONLY=1
|
|
// @env NYASH_PY_AUTODECODE=1
|
|
// Run:
|
|
// cargo build --release && ./target/release/nyash --backend vm examples/py_min_chain_vm.nyash
|
|
|
|
static box Main {
|
|
main() {
|
|
local py, math, sqrt_fn, x, r
|
|
py = new PyRuntimeBox()
|
|
math = py.import("math")
|
|
sqrt_fn = py.getattr(math, "sqrt")
|
|
x = new IntegerBox(16)
|
|
r = py.call(sqrt_fn, x)
|
|
print(r) // expects 4.0
|
|
return 0
|
|
}
|
|
}
|
|
|