# C.bind

Resolve a native function and cache its prepared signature.

```js
client.bind(symbol, signature)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `symbol` | string | Exported native 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). |

## Returns

Callable bound function with release().

## Example

```js
const length = C.bind("strlen", {returns: "size_t", args: ["cstring"]});
console.log(length("Hello")); // 5
length.release();
```

## 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](/doc/native) for types and ownership.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
