Skip to main content

Crate syncular_command

Crate syncular_command 

Source
Expand description

§syncular-command — one JSON command surface over the Rust client core

The command router the conformance shim proved (JSON in, JSON out, bytes as {"$bytes": hex}) factored into a transport-agnostic module so BOTH the stdio conformance shim AND the FFI native core dispatch through the same code. That keeps a single command surface, conformance-locked via the shim: whatever the shim exercises, the FFI core inherits.

The router is generic over the Transport seam. The shim binds it to a stdio host (transport inverted to the harness); the FFI crate binds it to a real native HTTP+WS transport. Everything host-specific — realtime notification draining, deferred requests, event queues — stays in each host; only the pure method → result dispatch (and its JSON parsing) is shared here.

Structs§

CreateEffects
Parsed side effects of a create command that the host must apply to its own transport/clock (the router stays transport-agnostic). The client is already installed into the Option<SyncClient> slot by dispatch.

Functions§

bytes_to_hex
bytes_value
dispatch
Dispatch one command against the client instance over transport.
hex_to_bytes
parse_encryption
§5.11: parse the encryption config into the client’s key map. Shape: { keys: { "<keyId>": {"$bytes": "<hex>"} } }. Keys are 32 bytes.
parse_limits
parse_mutations
value_bytes

Type Aliases§

CommandError
The (code, message) pair the driver protocol carries in an error.