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.1.tar.gz (50.2 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.1-cp310-abi3-win_amd64.whl (528.9 kB view details)

Uploaded CPython 3.10+Windows x86-64

atomr_view-0.3.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: atomr_view-0.3.1.tar.gz
  • Upload date:
  • Size: 50.2 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.1.tar.gz
Algorithm Hash digest
SHA256 e48ac7180c090370fdb7897b01450d4bd908c929606407b6fbdf0d78e44d4260
MD5 ba6f6eff78e3af696edb52fc0d448ed7
BLAKE2b-256 35e8ca542ab0bf3bef85bc91a566717b972c0ab480e9b19f18c846a9582b2923

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: atomr_view-0.3.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 528.9 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.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 835a52d32d2559d7160c0f3c351a9c32ee63e10dc304a0dcac8bdc1bffd3a7b1
MD5 70a4986b10847fe0295048353cd7baf9
BLAKE2b-256 1152c8c94419df962b46a3a29ddeb42db750a225db732f966bf7562aba32a3b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.3.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6dcf9deec4af320c962fb2a4be7f0de6d09280d0344f7b1680bcc3aba311aad1
MD5 5086c9473efded65a6d9d95af4e82e36
BLAKE2b-256 01263aa669da0dbdcada3344382e56ba7a9bcf2ddac35a9187e5238c3d7c034f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.3.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c4ee50be696a052e32c5607286a649e01e747a03b5503968ed4b02e76c9b0337
MD5 1b91e3561759f9cd79133e987a4b645b
BLAKE2b-256 e89913c30427ab77ae64438fc752381f0db2eaeffc39ee3f7454fa5e4444f234

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d136cb22ddf9fac17347ab7408ac54ab63253ee2869e09b253c8b347c2f557ca
MD5 6563c91c57da2854c2130a024225ef78
BLAKE2b-256 fac2c4c9adcb963f413ee9e55faa2d5877b8e432db2a59f41a0769e920274cea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 630cebd9fd019529104d5e09522a2835d0569b4eb10c21e50262b2a65e5cb256
MD5 33e607b37c5fe0eacdf5b7aafee6b31b
BLAKE2b-256 a218849ebec700f6c507f708b490da4856a0489c648b6bff34fc6b80b11c7d04

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.3.1-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.1-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.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e65c26ec47c54dcd81e454c8a8eeeb2160f1881b8192eb59fa0bad65f831c42d
MD5 40efe4c8daa918add172ea360010adc3
BLAKE2b-256 1471e28d91789454155675ae7c4af6ea9c81ca543200fe91649c700bff67a6df

See more details on using hashes here.

Provenance

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