Skip to content

Extract traverse-core-rs: shared Rust HTTP/SSE crate for linux-gtk and cli-rust #59

Description

@enricopiovesan

Summary

The Linux GTK4 and CLI Rust clients share identical HTTP + SSE client code. Extract a `traverse-core-rs` Rust crate that both binary targets depend on.

Depends on

Issues #54 (linux-gtk) and #55 (cli-rust) — implement alongside those, not after.

Blocked on

Same as #54/#55: Traverse #525#527

Crate contents

```
apps/traverse-starter/traverse-core-rs/
Cargo.toml
src/
lib.rs
client.rs # reqwest HTTP: execute, poll, fetchTrace
sse.rs # SSE stream consumer: eventsource-stream
state.rs # AppState enum, StateEvent types
discovery.rs # .traverse/server.json reader
tests/
client_tests.rs
sse_tests.rs
```

Definition of Done

  • `traverse-core-rs` Cargo workspace member
  • `TraverseClient` struct: `send_command()`, `subscribe_events()` (returns `impl Stream<Item = StateEvent>`), `health_check()`
  • `ServerDiscovery::from_file()` reads `.traverse/server.json`
  • `AppState` enum matches runtime state machine states
  • Unit tests: HTTP request construction, SSE parsing, server.json parsing
  • linux-gtk and cli-rust both depend on this crate
  • No GTK or terminal UI imports in the crate — platform-neutral

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions