Skip to main content

Crate libfw_client

Crate libfw_client 

Source
Expand description

libfw-client: reusable client-side transfer logic and browser glue.

The crate is intentionally split into a reusable Rust library core and a thin wasm bridge. This allows the client logic to be consumed by Rust code directly, while the JS/browser-facing API remains in the dedicated WASM module.

Structs§

ClientConfig
Runtime configuration of the WASM engine.
FileEntry
A file to transfer, identified by its virtual path.
LocalStore
localStorage-backed store (only reachable in the browser).
TuneCache
Persisted tuning cache entry (localStorage["libfw.tune.<originHash>"]).
TuneEvent
A tuning event emitted when a window evaluation changed the state.
TuneParams
The shared, live parameter table.
TuneStats
Smoothed transfer statistics.

Enums§

CompressLevel
Client-side compression level configuration.
LibfwError
Errors produced by the WASM engine.
TransferKind
Which transfer direction is ramping (drives which window/chunk dims move).
TunePhase
Lifecycle of the tuning state machine.

Traits§

TuneStore
Injected persistence backend (localStorage in the browser; a map in tests).

Functions§

backoff_ms
Pure exponential backoff: min(max, base << attempt) with saturation.
tune_key
The localStorage key for a base URL: libfw.tune.<originHash>.

Type Aliases§

TuneHandle
Shared handle to the tuning engine (Rc so clones share one table).