platform tier

platform-wasm-ui

WASM client infrastructure for offline-first admin portals

WASM client infrastructure for offline-first admin portals

Tierplatform
Roleunclassified (baselined)
Pathcrates/platform/wasm-ui
Edition2021
Targetsplatform_wasm_ui
Public items88 across 5 modules
Tests20

What it is for

# platform-wasm-ui

WASM client infrastructure for offline-first admin portals.

This crate provides the building blocks for creating offline-capable admin interfaces that sync with a server when connectivity is available.

Core Components

Storage Abstraction

This crate is generic over the storage backend via KeyValueStore from infrastructure-kv-store. This allows the same code to run with:

Architecture

┌─────────────────────────────────────────────────────────────┐
│                     WASM Admin Client                       │
│                                                             │
│  ┌───────────────┐    ┌───────────────────────────────┐    │
│  │   UI Layer    │───▶│   SyncEngine<S: KeyValueStore>│    │
│  │   (Leptos)    │    └───────────────┬───────────────┘    │
│  └───────────────┘                    │                    │
│          │                ┌───────────┼───────────┐        │
│          ▼                ▼           ▼           ▼        │
│  ┌───────────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐ │
│  │  KeyValueStore│  │ Outbox  │  │  Meta   │  │   API   │ │
│  │  (abstract)   │  │ Manager │  │ Storage │  │  Client │ │
│  └───────────────┘  └─────────┘  └─────────┘  └─────────┘ │
└─────────────────────────────────────────────────────────────┘

Example

use std::sync::Arc;
use platform_wasm_ui::{SyncEngine, SyncConfig};
use infrastructure_kv_store::InMemoryStore;
use infrastructure_sync::{Command, IdempotencyKey};

// Create storage and sync engine
let store = Arc::new(InMemoryStore::new());
let config = SyncConfig::new("https://api.example.com");
let mut engine = SyncEngine::new(config, store).await?;

// Queue a command (works offline)
let cmd = Command::CreatePage {
idempotency_key: IdempotencyKey::new(),
slug: "hello".to_string(),
title: "Hello World".to_string(),
page_type: "post".to_string(),
content: "My first post".to_string(),
};
engine.queue_command(cmd).await?;

// Check sync status
let status = engine.status();
if status.pending_count > 0 {
println!("{} commands pending sync", status.pending_count);
}

Capabilities

ApiClient

HTTP API client for server communication.

Item
pub struct ApiClient
ApiClient :: fn new(config : ApiConfig) -> Self
ApiClient :: fn set_auth_token(& mut self, token : Option <String>)
ApiClient :: fn is_authenticated(& self) -> bool
ApiClient :: async fn submit_command(& self, command : & Command) -> WasmResult <ServerAck>
ApiClient :: async fn submit_commands(& self, commands : & Command) -> WasmResult <Vec <ServerAck>>
ApiClient :: async fn pull_changes(& self, request : & PullRequest) -> WasmResult <PullResponse>
ApiClient :: async fn login(& mut self, email : & str, password : & str) -> WasmResult <LoginResponse>
ApiClient :: async fn logout(& mut self) -> WasmResult <()>
ApiClient :: async fn refresh_token(& mut self) -> WasmResult <String>
ApiClient :: async fn health_check(& self) -> WasmResult <bool>

ApiConfig

HTTP API client for server communication.

Item
pub struct ApiConfig
ApiConfig :: fn new(base_url : impl Into <String>) -> Self
ApiConfig :: fn with_timeout(mut self, timeout_ms : u32) -> Self

LoginResponse

HTTP API client for server communication.

Item
pub struct LoginResponse

WasmError

Error types for WASM client operations.

Item
pub enum WasmError
WasmError :: fn storage(msg : impl Into <String>) -> Self
WasmError :: fn network(msg : impl Into <String>) -> Self
WasmError :: fn serialization(msg : impl Into <String>) -> Self
WasmError :: fn not_found(entity_type : impl Into <String>, entity_id : impl Into <String>) -> Self
WasmError :: fn server_error(status : u16, message : impl Into <String>) -> Self
WasmError :: fn is_retryable(& self) -> bool
WasmError :: fn requires_auth(& self) -> bool
WasmError :: fn from(err : serde_json::Error) -> Self
WasmError :: fn from(err : gloo_storage::errors::StorageError) -> Self
WasmError :: fn from(err : gloo_net::Error) -> Self

WasmResult

Error types for WASM client operations.

Item
pub type WasmResult<T>: Result <T, WasmError>

OutboxManager

Outbox queue manager for pending commands.

Item
pub struct OutboxManager<S : KeyValueStore>

OutboxManager<S>:all

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn all_pending(& self) -> Vec <& OutboxEntry>

OutboxManager<S>:clear

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn clear_synced(& mut self) -> WasmResult <usize>

OutboxManager<S>:conflicted

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn conflicted(& self) -> Vec <& OutboxEntry>

OutboxManager<S>:discard

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn discard(& mut self, entry_id : Uuid) -> WasmResult <()>

OutboxManager<S>:failed

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn failed(& self) -> Vec <& OutboxEntry>

OutboxManager<S>:get

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn get(& self, entry_id : Uuid) -> Option <& OutboxEntry>

OutboxManager<S>:handle

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn handle_ack(& mut self, entry_id : Uuid, ack : & ServerAck) -> WasmResult <()>

OutboxManager<S>:is

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn is_empty(& self) -> bool

OutboxManager<S>:len

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn len(& self) -> usize

OutboxManager<S>:mark

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn mark_syncing(& mut self, entry_id : Uuid) -> WasmResult <()>

OutboxManager<S>:new

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn new(store : Arc <S>) -> WasmResult <Self>

OutboxManager<S>:next

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn next_pending(& mut self) -> Option <& mut OutboxEntry>

OutboxManager<S>:queue

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn queue(& mut self, command : Command) -> WasmResult <OutboxEntry>

OutboxManager<S>:remove

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn remove_synced(& mut self, entry_id : Uuid) -> WasmResult <()>

OutboxManager<S>:retry

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: async fn retry(& mut self, entry_id : Uuid) -> WasmResult <()>

OutboxManager<S>:stats

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn stats(& self) -> OutboxStats

OutboxManager<S>:store

Outbox queue manager for pending commands.

Item
OutboxManager<S> :: fn store(& self) -> & Arc <S>

SyncConfig

Sync engine that coordinates offline-first synchronization.

Item
pub struct SyncConfig
SyncConfig :: fn new(base_url : impl Into <String>) -> Self
SyncConfig :: fn with_sync_interval(mut self, interval_ms : u32) -> Self
SyncConfig :: fn without_auto_sync(mut self) -> Self

SyncEngine

Sync engine that coordinates offline-first synchronization.

Item
pub struct SyncEngine<S : KeyValueStore>

SyncEngine<S>:check

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn check_connection(& mut self) -> WasmResult <bool>

SyncEngine<S>:conflicted

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: fn conflicted_entries(& self) -> Vec <& infrastructure_sync::OutboxEntry>

SyncEngine<S>:connection

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: fn connection_state(& self) -> ConnectionState

SyncEngine<S>:full

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn full_sync(& mut self) -> WasmResult <SyncResult>

SyncEngine<S>:get

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn get_entity <T : serde::de::DeserializeOwned>(& self, entity_type : & str, entity_id : Uuid,) -> WasmResult <Option <T>>

SyncEngine<S>:is

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: fn is_authenticated(& self) -> bool

SyncEngine<S>:list

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn list_entity_keys(& self, entity_type : & str) -> WasmResult <Vec <String>>

SyncEngine<S>:login

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn login(& mut self, email : & str, password : & str) -> WasmResult <()>

SyncEngine<S>:logout

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn logout(& mut self) -> WasmResult <()>

SyncEngine<S>:new

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn new(config : SyncConfig, store : Arc <S>) -> WasmResult <Self>

SyncEngine<S>:outbox

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: fn outbox_stats(& self) -> infrastructure_sync::OutboxStats

SyncEngine<S>:process

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn process_outbox(& mut self) -> WasmResult <usize>

SyncEngine<S>:pull

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn pull_changes(& mut self) -> WasmResult <Vec <Change>>

SyncEngine<S>:queue

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn queue_command(& mut self, command : Command) -> WasmResult <()>

SyncEngine<S>:resolve

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: async fn resolve_use_client(& mut self, entry_id : Uuid) -> WasmResult <()>
SyncEngine<S> :: async fn resolve_use_server(& mut self, entry_id : Uuid) -> WasmResult <()>

SyncEngine<S>:status

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: fn status(& self) -> & SyncStatus

SyncEngine<S>:store

Sync engine that coordinates offline-first synchronization.

Item
SyncEngine<S> :: fn store(& self) -> & Arc <S>

SyncResult

Sync engine that coordinates offline-first synchronization.

Item
pub struct SyncResult
SyncResult :: fn is_empty(& self) -> bool
SyncResult :: fn total(& self) -> usize

sync_status (other)

Sync status tracking for UI display.

Item
fn time_since_sync(last_sync : Option <DateTime <Utc>>) -> String

ConnectionState

Sync status tracking for UI display.

Item
pub enum ConnectionState
ConnectionState :: fn is_online(& self) -> bool
ConnectionState :: fn is_offline(& self) -> bool

SyncStatus:SyncStatus

Sync status tracking for UI display.

Item
pub struct SyncStatus

SyncStatus:default

Sync status tracking for UI display.

Item
SyncStatus :: fn default() -> Self

SyncStatus:indicator

Sync status tracking for UI display.

Item
SyncStatus :: fn indicator(& self) ->(& 'static str, String, & 'static str)

SyncStatus:is

Sync status tracking for UI display.

Item
SyncStatus :: fn is_fully_synced(& self) -> bool

SyncStatus:needs

Sync status tracking for UI display.

Item
SyncStatus :: fn needs_attention(& self) -> bool

SyncStatus:new

Sync status tracking for UI display.

Item
SyncStatus :: fn new() -> Self

SyncStatus:set

Sync status tracking for UI display.

Item
SyncStatus :: fn set_online(& mut self)
SyncStatus :: fn set_offline(& mut self)

SyncStatus:sync

Sync status tracking for UI display.

Item
SyncStatus :: fn sync_started(& mut self)
SyncStatus :: fn sync_completed(& mut self)
SyncStatus :: fn sync_failed(& mut self, error : String)

SyncStatus:total

Sync status tracking for UI display.

Item
SyncStatus :: fn total_outbox_items(& self) -> usize

SyncStatus:update

Sync status tracking for UI display.

Item
SyncStatus :: fn update_from_outbox(& mut self, stats : & infrastructure_sync::OutboxStats)

How to use it

From this crate's own rustdoc:


## Example

Module structure

platform_wasm_ui

flowchart TD
  n_platform_wasm_ui["platform_wasm_ui"]
  n_platform_wasm_ui --> n_api_client["api_client"]
  n_platform_wasm_ui --> n_error["error"]
  n_platform_wasm_ui --> n_outbox_manager["outbox_manager"]
  n_platform_wasm_ui --> n_sync_engine["sync_engine"]
  n_platform_wasm_ui --> n_sync_status["sync_status"]

Public surface

`api_client`

ItemWhat it is
pub struct ApiConfigConfiguration for the API client.
ApiConfig :: fn new(base_url : impl Into <String>) -> SelfCreate a new API config.
ApiConfig :: fn with_timeout(mut self, timeout_ms : u32) -> SelfSet the timeout.
pub struct ApiClientHTTP client for API communication.
ApiClient :: fn new(config : ApiConfig) -> SelfCreate a new API client.
ApiClient :: fn set_auth_token(& mut self, token : Option <String>)Set the auth token.
ApiClient :: fn is_authenticated(& self) -> boolCheck if authenticated.
ApiClient :: async fn submit_command(& self, command : & Command) -> WasmResult <ServerAck>Submit a command to the server.
ApiClient :: async fn submit_commands(& self, commands : & Command) -> WasmResult <Vec <ServerAck>>Submit multiple commands.
ApiClient :: async fn pull_changes(& self, request : & PullRequest) -> WasmResult <PullResponse>Pull changes from the server.
ApiClient :: async fn login(& mut self, email : & str, password : & str) -> WasmResult <LoginResponse>Login and get an auth token.
ApiClient :: async fn logout(& mut self) -> WasmResult <()>Logout.
ApiClient :: async fn refresh_token(& mut self) -> WasmResult <String>Refresh the auth token.
ApiClient :: async fn health_check(& self) -> WasmResult <bool>Check if the server is reachable.
pub struct LoginResponseLogin response.

`error`

ItemWhat it is
pub enum WasmErrorErrors that can occur in the WASM client.
WasmError :: fn storage(msg : impl Into <String>) -> SelfCreate a storage error.
WasmError :: fn network(msg : impl Into <String>) -> SelfCreate a network error.
WasmError :: fn serialization(msg : impl Into <String>) -> SelfCreate a serialization error.
WasmError :: fn not_found(entity_type : impl Into <String>, entity_id : impl Into <String>) -> SelfCreate a not found error.
WasmError :: fn server_error(status : u16, message : impl Into <String>) -> SelfCreate a server error.
WasmError :: fn is_retryable(& self) -> boolCheck if this error is retryable.
WasmError :: fn requires_auth(& self) -> boolCheck if this requires re-authentication.
WasmError :: fn from(err : serde_json::Error) -> Self
WasmError :: fn from(err : gloo_storage::errors::StorageError) -> Self
WasmError :: fn from(err : gloo_net::Error) -> Self
pub type WasmResult<T>: Result <T, WasmError>Result type for WASM operations.

`outbox_manager`

ItemWhat it is
pub struct OutboxManager<S : KeyValueStore>Manages the outbox queue for offline command storage
OutboxManager<S> :: async fn new(store : Arc <S>) -> WasmResult <Self>Create a new outbox manager with the given store.
OutboxManager<S> :: fn store(& self) -> & Arc <S>Get reference to the underlying store.
OutboxManager<S> :: async fn queue(& mut self, command : Command) -> WasmResult <OutboxEntry>Queue a new command.
OutboxManager<S> :: fn next_pending(& mut self) -> Option <& mut OutboxEntry>Get the next entry ready for processing
OutboxManager<S> :: fn all_pending(& self) -> Vec <& OutboxEntry>Get all pending entries (for batch processing).
OutboxManager<S> :: async fn mark_syncing(& mut self, entry_id : Uuid) -> WasmResult <()>Mark an entry as syncing.
OutboxManager<S> :: async fn handle_ack(& mut self, entry_id : Uuid, ack : & ServerAck) -> WasmResult <()>Handle a server acknowledgment.
OutboxManager<S> :: async fn remove_synced(& mut self, entry_id : Uuid) -> WasmResult <()>Remove a completed (synced) entry.
OutboxManager<S> :: async fn clear_synced(& mut self) -> WasmResult <usize>Clear all synced entries.
OutboxManager<S> :: fn stats(& self) -> OutboxStatsGet statistics about the outbox.
OutboxManager<S> :: fn conflicted(& self) -> Vec <& OutboxEntry>Get all conflicted entries.
OutboxManager<S> :: fn failed(& self) -> Vec <& OutboxEntry>Get all failed entries.
OutboxManager<S> :: async fn retry(& mut self, entry_id : Uuid) -> WasmResult <()>Retry a failed entry.
OutboxManager<S> :: async fn discard(& mut self, entry_id : Uuid) -> WasmResult <()>Discard a conflicted or failed entry.
OutboxManager<S> :: fn get(& self, entry_id : Uuid) -> Option <& OutboxEntry>Get entry by ID.
OutboxManager<S> :: fn is_empty(& self) -> boolCheck if outbox is empty.
OutboxManager<S> :: fn len(& self) -> usizeTotal number of entries.

`sync_engine`

ItemWhat it is
pub struct SyncConfigConfiguration for the sync engine.
SyncConfig :: fn new(base_url : impl Into <String>) -> SelfCreate a new sync config.
SyncConfig :: fn with_sync_interval(mut self, interval_ms : u32) -> SelfSet sync interval.
SyncConfig :: fn without_auto_sync(mut self) -> SelfDisable auto-sync.
pub struct SyncEngine<S : KeyValueStore>The sync engine coordinates offline-first synchronization
SyncEngine<S> :: async fn new(config : SyncConfig, store : Arc <S>) -> WasmResult <Self>Create a new sync engine.
SyncEngine<S> :: fn status(& self) -> & SyncStatusGet current sync status.
SyncEngine<S> :: fn is_authenticated(& self) -> boolCheck if authenticated.
SyncEngine<S> :: async fn queue_command(& mut self, command : Command) -> WasmResult <()>Queue a command for sync
SyncEngine<S> :: async fn process_outbox(& mut self) -> WasmResult <usize>Process the outbox (sync pending commands).
SyncEngine<S> :: async fn pull_changes(& mut self) -> WasmResult <Vec <Change>>Pull changes from the server.
SyncEngine<S> :: async fn full_sync(& mut self) -> WasmResult <SyncResult>Perform a full sync (push + pull).
SyncEngine<S> :: async fn check_connection(& mut self) -> WasmResult <bool>Check server connectivity.
SyncEngine<S> :: fn connection_state(& self) -> ConnectionStateGet connection state.
SyncEngine<S> :: async fn login(& mut self, email : & str, password : & str) -> WasmResult <()>Login.
SyncEngine<S> :: async fn logout(& mut self) -> WasmResult <()>Logout.
SyncEngine<S> :: fn conflicted_entries(& self) -> Vec <& infrastructure_sync::OutboxEntry>Get conflicted entries.
SyncEngine<S> :: async fn resolve_use_client(& mut self, entry_id : Uuid) -> WasmResult <()>Resolve a conflict by using client version (force push).
SyncEngine<S> :: async fn resolve_use_server(& mut self, entry_id : Uuid) -> WasmResult <()>Resolve a conflict by discarding client changes.
SyncEngine<S> :: fn store(& self) -> & Arc <S>Get reference to the underlying store.
SyncEngine<S> :: fn outbox_stats(& self) -> infrastructure_sync::OutboxStatsGet outbox stats.
SyncEngine<S> :: async fn get_entity <T : serde::de::DeserializeOwned>(& self, entity_type : & str, entity_id : Uuid,) -> WasmResult <Option <T>>Get an entity from local storage.
SyncEngine<S> :: async fn list_entity_keys(& self, entity_type : & str) -> WasmResult <Vec <String>>List all entity keys of a type.
pub struct SyncResultResult of a sync operation.
SyncResult :: fn is_empty(& self) -> boolCheck if anything was synced.
SyncResult :: fn total(& self) -> usizeTotal changes.

`sync_status`

ItemWhat it is
pub enum ConnectionStateConnection state.
ConnectionState :: fn is_online(& self) -> boolCheck if online.
ConnectionState :: fn is_offline(& self) -> boolCheck if offline.
pub struct SyncStatusCurrent sync status for UI display.
SyncStatus :: fn default() -> Self
SyncStatus :: fn new() -> SelfCreate a new sync status.
SyncStatus :: fn indicator(& self) ->(& 'static str, String, & 'static str)Get status indicator for display
SyncStatus :: fn needs_attention(& self) -> boolCheck if there are items needing attention.
SyncStatus :: fn is_fully_synced(& self) -> boolCheck if everything is synced.
SyncStatus :: fn total_outbox_items(& self) -> usizeTotal items in outbox.
SyncStatus :: fn set_online(& mut self)Mark as online.
SyncStatus :: fn set_offline(& mut self)Mark as offline.
SyncStatus :: fn update_from_outbox(& mut self, stats : & infrastructure_sync::OutboxStats)Update from outbox stats.
SyncStatus :: fn sync_started(& mut self)Mark sync started.
SyncStatus :: fn sync_completed(& mut self)Mark sync completed successfully.
SyncStatus :: fn sync_failed(& mut self, error : String)Mark sync failed.
fn time_since_sync(last_sync : Option <DateTime <Utc>>) -> StringTime since last sync, human-readable.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
IndexedDbStoreinfrastructure_kv_store_indexeddb::IndexedDbStore
OutboxManageroutbox_manager::OutboxManager
{AckStatus,Change,Command,CommandId,Conflict,ConflictResolution,IdempotencyKey,OutboxEntry,OutboxStatus,PullRequest,PullResponse,ServerAck,Version,}infrastructure_sync::{AckStatus,Change,Command,CommandId,Conflict,ConflictResolution,IdempotencyKey,OutboxEntry,OutboxStatus,PullRequest,PullResponse,ServerAck,Version,}
{ApiClient,ApiConfig}api_client::{ApiClient,ApiConfig}
{ConnectionState,SyncStatus}sync_status::{ConnectionState,SyncStatus}
{ContentBlock,ContentPage,PageStatus,PageType}content_cms::{ContentBlock,ContentPage,PageStatus,PageType}
{InMemoryStore,KeyValueStore,KeyValueStoreExt}infrastructure_kv_store::{InMemoryStore,KeyValueStore,KeyValueStoreExt}
{SyncConfig,SyncEngine,SyncResult}sync_engine::{SyncConfig,SyncEngine,SyncResult}
{WasmError,WasmResult}error::{WasmError,WasmResult}

Boundary

Reaches into content, infrastructure.

Shares tier platform with 9 other crates: platform-api, platform-corpus-console, platform-customer-ui, platform-disclosure-lab, platform-dto, platform-html-components, platform-leptos-components, platform-privacy-scan-api, … (9 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)platform
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/platform/wasm-ui
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_platform["platform"] --> n_content["content"]
  n_platform["platform"] --> n_infrastructure["infrastructure"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`content-cms`contentnoalways
`infrastructure-kv-store`infrastructurenoalways
`infrastructure-kv-store-indexeddb`infrastructureyesalways
`infrastructure-sync`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
futures^0.3noalways
gloo-net^0.6noalways
gloo-storage^0.3noalways
gloo-timers^0.3noalways
leptos^0.6csryesalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
uuid^1v4, v7, serde, jsnoalways
wasm-bindgen^0.2noalways
wasm-bindgen-futures^0.4noalways
web-sys^0.3Window, Document, Storage, console, HtmlInputElement, FormData, … (11 total)noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1full, rt, macrosnoalways
wasm-bindgen-test^0.3noalways

Build. None.

Depended on by. 1 workspace crate.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_wasm_ui["application-wasm-ui"] -->|uses| SELF
  SELF["platform-wasm-ui"]
  SELF -->|runtime| n_content_cms["content-cms"]
  SELF -->|runtime| n_infrastructure_kv_store["infrastructure-kv-store"]
  SELF -->|runtime| n_infrastructure_kv_store_indexeddb["infrastructure-kv-store-indexeddb"]
  SELF -->|runtime| n_infrastructure_sync["infrastructure-sync"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

FeatureEnablesOn by default
defaultyes
indexeddbinfrastructure-kv-store-indexeddbno
infrastructure-kv-store-indexeddbdep:infrastructure-kv-store-indexeddbno
leptosdep:leptosno
leptos-uileptosno
flowchart LR
  n_default["default"]
  n_indexeddb["indexeddb"] --> n_infrastructure_kv_store_indexeddb["infrastructure-kv-store-indexeddb"]
  n_infrastructure_kv_store_indexeddb["infrastructure-kv-store-indexeddb"] --> n_dep_infrastructure_kv_store_indexeddb["dep:infrastructure-kv-store-indexeddb"]
  n_leptos["leptos"] --> n_dep_leptos["dep:leptos"]
  n_leptos_ui["leptos-ui"] --> n_leptos["leptos"]

Targets

KindNameSource
libplatform_wasm_ui`src/lib.rs`

Error model

Error typeNamed by
WasmErrorWasmResult

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

1 workspace crate depends on this one: application-wasm-ui.

Verification

KindCount
Unit tests20
Integration tests0
Examples0
Doctests1

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
api_client300
error200
outbox_manager100
sync_engine300
sync_status300

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc8488
Public modules with a //! block55
pie showData
    title Public items with rustdoc
    "Documented" : 84
    "No rustdoc detected" : 4

Metrics

MetricValue
Rust source files6
Source lines1766
Code lines1181
Public API items88
Public modules5
Tests20
Examples0
Cargo features5
Direct runtime dependencies18
Workspace reverse dependencies1
pie showData
    title Public API by kind
    "enum" : 2
    "function" : 1
    "method" : 76
    "struct" : 8
    "type alias" : 1
pie showData
    title Rust source composition
    "Code" : 1181
    "Blank or comment" : 585

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All platform · Manual