Introduces a generic globalThis.hostCallback() in the JS VM that executes a function on the host with the signature host_callback(String) -> Result<String, String>, marshalling JS in and out. This would allow us to implement https://github.com/commontoolsinc/labs/issues/217.
Given the default, reflecting callback host_callback(input: String) -> Result<String, String> { Ok(input) }, calling with {"foo":9} would result in the response {"foo":10,"reflect":{"test":123}}
Introduces a generic
globalThis.hostCallback()
in the JS VM that executes a function on the host with the signaturehost_callback(String) -> Result<String, String>
, marshalling JS in and out. This would allow us to implement https://github.com/commontoolsinc/labs/issues/217.Given the default, reflecting callback
host_callback(input: String) -> Result<String, String> { Ok(input) }
, calling with{"foo":9}
would result in the response{"foo":10,"reflect":{"test":123}}