Skip to content

Make Engine startup async and fallible #232

Description

@artrixdotdev

Problem

Engine::new is synchronous and returns Self, but actor startup binds TCP/uTP/UDP sockets asynchronously. Startup failures are not clearly surfaced to the frontend.

Relevant code:

  • Public constructor: crates/libtortillas/src/engine/mod.rs:95
  • Socket binds in actor startup: crates/libtortillas/src/engine/actor.rs:137

Dependency

Blocked by #231 because startup failures need typed public errors.

Acceptance criteria

  • Engine construction/startup is async and returns Result.
  • TCP/uTP/UDP bind failures are reported before the frontend treats the engine as usable.
  • Default construction semantics are documented.
  • Existing examples and doctests are updated.
  • Tests cover bind failure behavior where feasible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    high prioGET DONE ASAP!!libtortillasChanges in the libtortillas craterefactorNeither fixes a bug nor adds a featurerustPull requests that update rust codetui-foundationWork needed before building the Tortillas TUI

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions