LibMlxBindings class

Bindings for src/lib_mlx.h.

Regenerate bindings with dart run ffigen --config ffigen.yaml.

Constructors

LibMlxBindings(DynamicLibrary dynamicLibrary)
The symbols are looked up in dynamicLibrary.
LibMlxBindings.fromLookup(Pointer<T> lookup<T extends NativeType>(String symbolName))
The symbols are looked up with lookup.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

lib_mlx_free(Pointer<Void> ptr) → void
Frees strings returned from lib_mlx_* functions.
lib_mlx_load_model(Pointer<Char> config_json) Pointer<Char>
Loads a local model path and returns a JSON result: {"ok":true,"handle":1,"status":"ready","model_id":"..."}.
lib_mlx_server_status(int handle) Pointer<Char>
Returns JSON model/server status for a loaded model handle.
lib_mlx_start_server(int handle, Pointer<Char> config_json) Pointer<Char>
Starts the localhost OpenAI-compatible server for a loaded model handle.
lib_mlx_stop_server(int handle) Pointer<Char>
Stops the server attached to a loaded model handle.
lib_mlx_unload_model(int handle) Pointer<Char>
Stops any server and unloads the resident model handle.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited