Commit graph

4 commits

Author SHA1 Message Date
Till Wegmueller
d59411ca60 Add session lifecycle, token-based identity, and client token support
Core session management infrastructure for Phase 3:

- Session module: SessionId, SessionToken, SessionState enum with
  validated transitions (Creating→Active⇄Suspended→Destroyed),
  Session struct with timeout tracking, SessionRegistry with O(1)
  lookup by ID and token (10 unit tests)

- Protocol: ClientHello gains optional token field, ServerHello gains
  resumed flag and token echo, SessionStatus/SessionEvent enums added
  to ControlMessage for session state notifications

- Server: SessionRegistry in headless CalloopData, sessions created on
  client connect (with token lookup for resumption), suspended on
  disconnect (not destroyed), periodic cleanup of expired sessions

- Client: --token CLI flag, persistent token at ~/.config/wayray/token
  with auto-generation (random 16-byte hex), token sent in ClientHello,
  resumed state logged from ServerHello
2026-04-09 21:14:48 +02:00
Till Wegmueller
43a4d7e6af Add missing display.rs and wrclient display dependencies
display.rs (winit + wgpu renderer) and Cargo.toml changes (winit,
wgpu, pollster, env_logger) were created but not committed in the
Task 5 subagent.
2026-04-07 17:51:40 +02:00
Till Wegmueller
f79a934c2b Add QUIC transport layer with quinn for server and client
Implement QUIC networking for wrsrvd (server) and wrclient (client) using
quinn over rustls with self-signed certificates. Three logical channels:
control (bidirectional), display (server->client unidirectional), and
input (client->server unidirectional).

Server runs tokio in a background thread, communicating with the compositor
via std::sync::mpsc channels. Client exposes an async connect() API that
returns a ServerConnection with methods for sending input and receiving
frames.

Key design note: quinn streams are lazily materialized -- accept_bi/
accept_uni on the peer won't resolve until data is written. The handshake
protocol accounts for this by having each side write immediately after
opening streams.
2026-04-07 16:54:01 +02:00
Till Wegmueller
4e08dfb5a9 Set up Cargo workspace with four crates
Workspace: wrsrvd, wrclient, wayray-protocol, wradm under crates/.
Smithay configured with default-features=false, portable features only.
Implements ADR-007 project structure.
2026-04-04 18:16:53 +02:00