dlopen loads a shared library and returns a Library instance with typed symbols.
Syntax
Example
Parameters
| Parameter | Type | Description |
|---|---|---|
libName | string | Path or name of the .so library |
defs | Record<string, FFIFunction> | Map of function names to type definitions |
FFIFunction
Type Inference
dlopen uses TypeScript generics to infer the shape of symbols, providing IDE autocompletion for all defined function names.
Return Value
Returns aLibrary instance with typed symbols.