📚 Phase 12: Nyashスクリプトプラグインシステム設計と埋め込みVM構想
## 主な成果 - 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!
This commit is contained in:
19
examples/aot_py_eval_kwargs_env.nyash
Normal file
19
examples/aot_py_eval_kwargs_env.nyash
Normal file
@ -0,0 +1,19 @@
|
||||
// AOT Python kwargs via env-injected eval code (暫定ブリッジ)
|
||||
// 目的: TLVでのkwargs未整備の間、evalコードに **dict で渡す
|
||||
// Build:
|
||||
// cargo build --release --features cranelift-jit
|
||||
// Run:
|
||||
// NYASH_PY_EVAL_CODE="(__import__('builtins').int)(**{'x':'FF','base':16})" \
|
||||
// ./target/release/nyash --compile-native examples/aot_py_eval_kwargs_env.nyash -o app && \
|
||||
// NYASH_PY_EVAL_CODE="(__import__('builtins').int)(**{'x':'FF','base':16})" ./app
|
||||
|
||||
static box Main {
|
||||
main() {
|
||||
local py, r
|
||||
py = new PyRuntimeBox()
|
||||
r = py.eval() // code is read from NYASH_PY_EVAL_CODE (host side)
|
||||
me.console.println(r)
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user