runner: add NyVM wrapper core_bridge (canonicalize/dump) + opt-in wrapper canary; export module in common_util
This commit is contained in:
@ -157,9 +157,11 @@ box ParserBox {
|
||||
// === extern_c annotations ===
|
||||
add_extern_c(symbol, func) {
|
||||
// Entry shape: {"symbol":"hako_add","func":"Name/Arity"}
|
||||
local sym = match symbol { null => "", _ => symbol }
|
||||
local fn = match func { null => "", _ => func }
|
||||
local entry = "{\"symbol\":\"" + me.esc_json(sym) + "\",\"func\":\"" + me.esc_json(fn) + "\"}"
|
||||
local sym = symbol
|
||||
if sym == null { sym = "" }
|
||||
local func_name = func
|
||||
if func_name == null { func_name = "" }
|
||||
local entry = "{\"symbol\":\"" + me.esc_json(sym) + "\",\"func\":\"" + me.esc_json(func_name) + "\"}"
|
||||
local cur = me.externs_json
|
||||
if cur == null || cur.size() == 0 { cur = "[]" }
|
||||
if cur == "[]" {
|
||||
|
||||
Reference in New Issue
Block a user