osmaczko 7838d43b30
feat(client): add threaded transport polling (#125)
The client, not the app, now drives the transport; events are delivered
asynchronously, per ADR 0001.

- ChatClient owns Arc<Mutex<Core>> + a worker thread.
- The worker select!s over the inbound and shutdown channels; Drop joins it.
  Outbound runs on the caller's thread.
- A single Transport (DeliveryService + inbound()) owns both directions of the
  boundary, so the client takes one transport rather than a (delivery, inbound)
  pair. InProcessDelivery::new, CDelivery, and chat-cli's transports implement it.
- FFI replaces client_receive with client_push_inbound + client_poll_events.
- chat-cli drains Receiver<Event>; inbound and event channels are both crossbeam.
- Corrects ADR 0001's inbound sequence to push — the worker parks on select!,
  it never polls.
2026-06-11 10:08:07 +02:00
2026-01-30 15:46:36 +00:00

libchat

Supporting library for Logos-chat

Example app

bin/chat-cli is an end-to-end encrypted CLI chat app built on this library. By default it uses logos-delivery (Waku-based) as the transport so two users anywhere in the world can chat by sharing an intro bundle. A local file transport is also bundled in; pick at runtime with --transport <logos-delivery|file>.

# Build logos-delivery with Nix
nix build .#logos-delivery
# Build chat-cli with Cargo
LOGOS_DELIVERY_LIB_DIR=./result/lib cargo build --release -p chat-cli
# Run binary (defaults to --transport logos-delivery)
./target/release/chat-cli --name alice

See bin/chat-cli/README.md for full build, run, and test instructions.

Description
Supporting library for Logos-chat
Readme
Languages
Rust 99.5%
Nix 0.5%