Crate appy

Source
Expand description

§Appy - Declarative UI Framework for Native Application

Appy is a Rust framework for building native UI applications with a declarative syntax.

  • Inspired by React, it uses familiar concepts like function components and hooks.
  • Draws elements directly using hardware acceleration and OpenGL. There is no DOM involved.
  • Supports multiple rendering backeds, such as Glutin and SDL, which ensures cross-platform operation with a single application code base.

§Example

use appy::{*, types::*, components::*};

#[main_window]
pub fn app()->Elements {
   apx!{
       <bg color=0x800000/>
       <text text="Hello World" align=Align::Center/>
   }
}

Re-exports§

pub use glapp;
pub use glapp::gl;

Modules§

components
Graphical UI components.
hooks
Hooks that let you hook into the system for storing state and more.
types
Types used by hooks and components.
utils
Utilities.

Macros§

apx
Process element fragment.
rc_with_clone
Clone variables for closure, and create Rc.
with_clone
Clone variables for closure.

Attribute Macros§

derive_component
Create component properties.
function_component
Implement component renderer.
main_window
Application entry point.

Derive Macros§

ComponentBuilder
Create builder.
SnakeFactory
Produce snake cased factory function.