C.call
Bind through the cache and invoke immediately.
js
client.call(symbol, signature, ...args)Arguments
| Argument | Type | Meaning |
|---|---|---|
symbol | string | Exported symbol. |
signature | object | Required returns and args (array of fixed type names). Optional library (absolute executable path), ownership (borrowed/retained for object results), captureErrno (boolean). |
args | any | Arguments matching signature.args. |
Returns
Converted native result; with captureErrno:true, {value, errno}.
Example
js
console.log(C.call("strlen", {returns: "size_t", args: ["cstring"]}, "Hello"));Notes
Advanced API: the declared types must match the real native function. Wrong signatures/addresses can crash the target. No variadic functions, callbacks or arbitrary custom structures. Calls run on the target main thread. See C functions and memory for types and ownership.