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

Uploaded CPython 3.10+Windows x86-64

atomr_view-0.4.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.4.1-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.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.4.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.4.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.4.1.tar.gz.

File metadata

  • Download URL: atomr_view-0.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0c00652d3ce09f367c5032a796421439ca9d9600f80387c32ad9632c69796479
MD5 389f1254e3153f40d294fb66626c0a78
BLAKE2b-256 4049844f32f1e64752e96501c7801a57a7533de711e28dcca8fd122457df8217

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: atomr_view-0.4.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 529.4 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.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a7c8e55ac1657af8b456a6af79ffbbadc321d9af59e70c389076c0f2e4c38d78
MD5 7a65eb0b889f59bfb3de930e59fe9312
BLAKE2b-256 f4d6cd67aacb0169429c2266350a02d69d0e664d9905bf6d9995f5c9710b23da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.4.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f9158a48a5822fa7a317a8b5e5ace1b460484c4c3c35bdc56f2c04ad894a3970
MD5 618e00fc460df4c69f7d4335946003b6
BLAKE2b-256 59deebf3771a3b7ee76af635dbf15a35180dbb609b8917ca72f43b45b079f9fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.4.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5a3f87eaf346e40b3ae6c71d821e776305491c3cf61e047ece03a035f3c9ae68
MD5 801626cd8b48db179af3f0b7cc8d9b55
BLAKE2b-256 06e02e678ed5fa781fd69f470e9113f0fd7eb1852bbae66d80dd7878046ef342

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.4.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bedc7f02845e28007754e375c51eb99b83a7bc85123537eee7ac11b48edd8644
MD5 be8a492cb72d20fcb8269c89caf5b064
BLAKE2b-256 6ba025969d787e181be198b9d02057509f650187e58d8376a8bb696fdf9d5595

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for atomr_view-0.4.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 05b1b40d3db947c44feee5bff8f2b3d942698aaaf8931fafd9107f6bd380f063
MD5 9d9b398481f1f478dfa128615166adc6
BLAKE2b-256 078b8938daa4fb5f9d4eec43f72df31f9e3ee109589efa1f55567a70dfccc567

See more details on using hashes here.

Provenance

The following attestation bundles were made for atomr_view-0.4.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.4.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.4.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 1e445b1cc74716f7336c8099f73c94be87b4ec8990ef1cebb727e5155395cc10
MD5 f3c2dc641cca2452d0160578da700958
BLAKE2b-256 d2e5210a1b1c9d056ab76c64bc8a388c7f8884bf7c8a4b3061b83cb9cc81c7b5

See more details on using hashes here.

Provenance

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