Skip to main content

Backend-agnostic UI/visualisation system for atomr — actor-driven scenes across native, web, and mobile.

Project description

atomr-view — Heavy Client UI for Federated atomr Systems

Status: Implementation Phase Complete / Testing Suite Active

atomr-view is an actor-based view management system designed for heavy client applications (Desktop, Mobile, Wasm) that integrate with federated atomr clusters. It treats the UI rendering surface as a supervised peer with network-shaped failure modes, using the actor model to bridge the gap between remote state authority and local pixels.

Mental Model

In atomr-view, the UI is not a separate layer bridged by callbacks; it is a subgraph of the local ActorSystem.

  • WindowActor: Owns an OS window, its declarative scene, and child regions.
  • RegionActor: Manages a stateful subtree of the UI, typically subscribed to a remote sharded entity or a local streaming feed.
  • UiBridge: An asynchronous, backpressured conduit between the actor system and the rendering thread (e.g., winit + wgpu).
  • SceneDescription: A declarative, keyed tree of semantic UI intent (Button, Text, etc.) that the backend reconciles against native widgets.

Key Features

  • Location Transparency: UI actors interact with cluster-sharded actors using the same tell/ask/watch primitives as local actors.
  • Backpressure Discipline: The UiBridge uses conflation for state updates, ensuring the UI thread only ever processes the freshest state available.
  • Declarative Reconciliation: Keyed tree-diffing computes minimal patches, preserving local UI state (like cursor position) across updates.
  • Multi-Backend Strategy: Supports winit + wgpu + egui for desktop, with architectural hooks for Wasm (DOM) and Mobile (SwiftUI/Compose).
  • Python-First API: Full integration via PyO3, allowing UI actors and complex scene manipulation to be authored in Python.

Platform Backends

atomr-view supports multiple rendering surfaces via the UiBackend strategy:

  • Desktop (winit + wgpu + egui): The default reference implementation for high-performance desktop apps.
  • Bevy (BevyBackend): Integrates the actor system with Bevy's ECS. Use the ActorBacked component to mirror ECS entities with long-lived actors for persistence and netcode.
  • Wasm (WebDomBackend): Targets browser environments with a cooperative single-threaded scheduler that yields to requestAnimationFrame.
  • Mobile (NativeShellBackend): Bridges to SwiftUI (iOS) and Jetpack Compose (Android) via uniffi, maintaining native UI performance while keeping business logic in Rust actors.

Quick Start

Rust

use atomr_view_core::prelude::*;
use atomr_core::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let sys = ActorSystem::create("App", Config::reference()).await?;
    
    // 1. Initialize the bridge and backend
    let (cmd_tx, cmd_rx) = mpsc::channel(100);
    let (evt_tx, evt_rx) = mpsc::channel(100);
    let bridge = UiBridge { cmd_rx, evt_tx };
    
    // 2. Start the bridge actor
    let bridge_actor = sys.actor_of(Props::create(move || {
        UiBridgeActor::new(cmd_tx.clone(), evt_rx)
    }), "ui-bridge")?;

    // 3. Define a window actor
    let main_window = sys.actor_of(Props::create(move || {
        WindowActor::new("main", bridge_actor.clone())
    }), "main-window")?;

    // 4. Run the backend (blocks main thread)
    WinitWgpuBackend.run(bridge);
    
    Ok(())
}

Python

import atomr_view as view

ui = view.PyUiSystem()
ui.create_window("main", "My Federated App")

# Update the scene declaratively
root = view.SceneNode(
    key=view.SceneKey(),
    kind=view.NodeKind.Container(),
    properties=view.PropertyMap({"layout": view.PropertyValue.String("vertical")}),
    children=[
        view.SceneNode(
            key=view.SceneKey(),
            kind=view.NodeKind.Text(),
            properties=view.PropertyMap({"text": view.PropertyValue.String("Hello from Python!")}),
            children=[]
        )
    ]
)
ui.set_scene("main", view.SceneDescription(root))

Implementation Status

  • Core Foundation: UiBridge, SceneDescription, keyed diffing engine.
  • Desktop Backend: winit + wgpu + egui reference implementation.
  • Python Bindings: PyO3-based bridge with full scene manipulation support.
  • Testing: Property-based tests for diffing invariants and async integration tests.
  • Bevy Integration: BevyBackend bridging actors with ECS entities.
  • Wasm Support: WebDomBackend with cooperative cooperative scheduler hooks.
  • Mobile Flow: NativeShellBackend with uniffi bindings for native shells.

Project Structure

  • crates/atomr-view-core: Core actor logic and scene engine.
  • crates/atomr-view-backends: Swappable rendering strategies.
  • crates/atomr-view-python: PyO3 integration.
  • ai-skills/: Skills for AI assistants working with atomr-view.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atomr_view-0.4.0.tar.gz (50.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

atomr_view-0.4.0-cp310-abi3-win_amd64.whl (529.6 kB view details)

Uploaded CPython 3.10+Windows x86-64

atomr_view-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

atomr_view-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

atomr_view-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

atomr_view-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

atomr_view-0.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (1.1 MB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file atomr_view-0.4.0.tar.gz.

File metadata

  • Download URL: atomr_view-0.4.0.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atomr_view-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a86754d51cff2c364829bdb7d9047d6558c0922de158ecbd11b2e4a1ff5b055a
MD5 131c3c0b59a9b957aa75fb72bc951e1e
BLAKE2b-256 85ea925ade3f2df3db7e0f3aebb5376b008c5683a8be090b6769ff5ee92208ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.0.tar.gz:

Publisher: release.yml on rustakka/atomr-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atomr_view-0.4.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: atomr_view-0.4.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 529.6 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atomr_view-0.4.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a97b5e111f09e8312a640a097bf40f404fdeb85af189d24d35e7a9a6635409f9
MD5 81f318dfacdb1cf902f2d7dc7e15c5dd
BLAKE2b-256 f52ec62c685f174f4b56347533be6b861e277dc29988a8621d166f84c17b8e84

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.0-cp310-abi3-win_amd64.whl:

Publisher: release.yml on rustakka/atomr-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atomr_view-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for atomr_view-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 23790e19e6e4fc522f9d27672446c91cf91178b7ef0b782d4b362d9ba94acb5d
MD5 13693a6e8cca45465772bd09bcaa38bb
BLAKE2b-256 892bbc9174e5561f4ebf7413e7759084a209860a0d9e4f407fac54199524e60e

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on rustakka/atomr-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atomr_view-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for atomr_view-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 95c83fe45cf251f3af025d495a559902b83ab01dcf5954a4787163db86bebf0a
MD5 7f79b4b5b10f4cb0196530212fb8d578
BLAKE2b-256 47a343570ac1c1aec46d70a8a3953c2ca45b84f2cad4835f1ec6891545bf18d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on rustakka/atomr-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atomr_view-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for atomr_view-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca0bdd96aad9bc72259f64808c1c37c53b2babb90f2d91ae36dff6433813ff65
MD5 5ad5ee42af2a91f1c482a67f9b2eb8e9
BLAKE2b-256 9b5c23e2f508b05c38204117f920245ce0f480cfba2861d3232b821c2a48bb15

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on rustakka/atomr-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atomr_view-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for atomr_view-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 80920a50124c94039daebff3fd4123899a123e1c6f412bba3fd757d590e7a4cf
MD5 85d5d7da51641527d91582342b88a9a6
BLAKE2b-256 66b6726c940ede333ba37e9c463fc5e43c3585927ce51e20929403846a7a5e7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on rustakka/atomr-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atomr_view-0.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for atomr_view-0.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 7c601e99e6276d6f8477e06e4e4f02acd30a8d3ec66edfcbfb6a690b847d760a
MD5 a4f9a21cc7762f9f4b9cb1c751d17a75
BLAKE2b-256 ad174ef79a31b1589c36688692fde977f38353a71fd777f80da8d8672ae15fce

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on rustakka/atomr-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page