Expand description
A fully asynchrouns raw SimpleX client backed by the SimpleX FFI bindings(see simploxide_sxcrt_sys for setup instructions) that provides:
-
Multi-instance support: run many SimpleX-Chat instances from a single process. Each instance is fully isolated and all are served by a single shared worker thread with fair round-robin scheduling and per-instance execution caps to prevent starvation.
-
Complete asynchonisity: futures created by the same instance of a client are fully independent from each other. The event queue receives events independently from client actions.
-
Graceful shutdown with strong guarantees:
-
All commands enqueued before
RawClient::disconnectare guaranteed to execute and return their responses. -
All commands enqueued after
RawClient::disconnectare guaranteed to returnCallError::Failurewithout being executed. -
You will receive events for as long as the chat instance is active. After disconnect the remaining buffered events are delivered and then the event queue closes.
-
Current implementation heavily depends on tokio runtime and won’t work with other
executors.
Modules§
Structs§
- DbOpts
- Database options for a SimpleX chat instance.
- Default
User - The SimpleX user profile used to initialise the chat instance.
- RawClient
- A lightweight cheaply clonable client for sending raw requests(SimpleX commands) and receiving raw responses(JSON objects).
- RawEvent
Queue - An event queue that buffers incoming SimpleX events independently of client activity.
- Simplex
Version - Parses SimpleX version numbers in the form
MAJOR.MINOR.PATCH.HOTFIX. - Worker
Config - Configuration for the shared FFI worker thread.
Enums§
- Call
Error - Init
Error - Migration
Confirmation - Version
Error - Error returned by
RawClient::version.
Functions§
- init
- Open a SimpleX database with default
WorkerConfigand start receiving events. - init_
with_ config - Open a SimpleX database and start receiving events.