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.3.3.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.3.3-cp310-abi3-win_amd64.whl (529.2 kB view details)

Uploaded CPython 3.10+Windows x86-64

atomr_view-0.3.3-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.3.3-cp310-abi3-musllinux_1_2_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

atomr_view-0.3.3-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.3.3-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.3.3-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.3.3.tar.gz.

File metadata

  • Download URL: atomr_view-0.3.3.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.3.3.tar.gz
Algorithm Hash digest
SHA256 6e450c48db9635ae5a2075319e1c1e13978f43910b7d8a4c860509fbf37e1d58
MD5 3943f1df8f353ba065ab21d34ed4131c
BLAKE2b-256 c56970506548b6d97703e562fa5466fe702c461c7e3ec7d6897088e0bb781e8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.3.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.3.3-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: atomr_view-0.3.3-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 529.2 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.3.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 84ef78bde4561538924fa902f42823d8390a1d6332206ffd0695ec4664952ad8
MD5 d064182e4a33fe4bbbd6ecddf9e110f5
BLAKE2b-256 c37dce11709227272a250c3cfb91c68edd1483d080b6745a4453abdbf5c84339

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.3-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.3.3-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for atomr_view-0.3.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ef8678f5743d833d3a606b3ef9e396384c294b32eb68800e5cd6b6af35a900b9
MD5 bf1e3f10d053f60ad27ad1672f080abd
BLAKE2b-256 fa443113cbe5811bedd83813c24221383cdd39f3a7a3f141a8c2d4de142105db

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.3-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.3.3-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for atomr_view-0.3.3-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3d58e1f58aa35cea427ce05fcdaa8952cd3027443874c542d7564ac0f679ded2
MD5 41e25c8ea23aaf010bf2d3bae035bbdf
BLAKE2b-256 849e4c41ce622a833a3e5ad2a4d24d2b8716aefd7faa347365637310afbe37b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.3-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.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for atomr_view-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b31f7f5cad6112c7130a7f557f1b0d33eaa12b7faaf682178e70a65fa08f7a56
MD5 e121206580f50e1669db5b4ed003f458
BLAKE2b-256 42a8f0ce52c90b03be0a919e436b13b58f4489ffe0e7f63438f2fac6288bc43c

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.3-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.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for atomr_view-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 498ec52cd3b70972e7673b92136cc9f87985125403f285d0ef68b176790c7b76
MD5 a0721fe71cf7fbb5cddd40c88d5e0471
BLAKE2b-256 c54991ae6e61fc5402f12e4755821cf4360890754bccaa3fdfff6fb3587ea13a

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.3-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.3.3-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.3.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e47fd38c92aa792fde1bd69620437fd19786175f8d7969140faa943196c3bea5
MD5 49dd23dbb2f44ff517dcef741d7de42e
BLAKE2b-256 10289350dc33f029dd9f31dea30b398ab1190235e2001249ab67fbd18718e981

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.3-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