abstractavatar 0.2.0

Platform-independent procedural activity avatars with optional native/WebAssembly ABI
Documentation

AbstractAvatar

crates.io PyPI docs.rs CI

AbstractAvatar generates procedural avatars from explicit activity state, time, audio level and gaze. One Rust implementation supplies terminal, browser and native applications with a common catalog and rendering behavior.

Use it for an assistant portrait, an activity indicator or a procedural character that responds to your application's state. The host supplies state and presentation; AbstractAvatar generates the picture locally.

The seven ready avatar designs, speaking

What's new in 0.2.0: the catalog keeps 27 designs; 17 are retired, and a stored retired or unknown id still renders (its replacement, or watch-halo). Seven designs are ready and offered to users; the other 20 are experimental: they render when asked for by key but pickers do not list them. The picture above shows the ready designs. watch-rings moves each ring with its own voice band, and thinking and working are distinct animations in every design. See the changelog.

Start with Rust

Add the crate from crates.io (Rust 1.87+):

cargo add abstractavatar
use abstractavatar::{AvatarPose, AvatarStyle, Frame, Gaze, Palette};

let frame = Frame::new(AvatarStyle::WatchHalo, AvatarPose::Speaking, 0.6, 1.2, Gaze::default());
let palette: Palette = [[0xffc060ff; 256], [0xff7070ff; 256], [0xd8e0ffff; 256]];
let rgba = frame.rgba(0.2, -0.1, 2.0 / 128.0, &palette);

Enable the ffi feature for the C ABI and WebAssembly exports, and json for the versioned parameter descriptor.

Start with Python

Install from PyPI with Python 3.10+:

python -m pip install abstractavatar
python -m abstractavatar catalog
python -m abstractavatar render --style watch-halo --state speaking --level 0.6 --size 128 --output avatar.png

Wheels for Linux x86_64 and aarch64 (manylinux), macOS arm64 and x86_64, and Windows x86_64 include the compiled native library. On other platforms pip builds the library from the source distribution, which needs Rust 1.87+. To build from a checkout, run python -m pip install . in the cloned repository. See getting started for library use and platform builds.

Integrate a player

  • Rust: create a Frame and sample composited RGBA through your theme's material ramps.
  • Browser: run the bundled WebAssembly generator and present RGBA pixels on Canvas.
  • Python/native: request RGBA pixels through the binding or the C interface and present them with your UI toolkit.

Store catalog style identifiers, rather than numeric indices. Offer users only the ready designs (AvatarStyle::ready(), Python ready(), avatar_ready_*). Supply time explicitly, stop animation while hidden, and use a static frame when reduced motion is enabled. Platform adapters do not need their own geometry implementations.

The catalog includes shaded characters, particle orbs, forms, machines, cosmic and nature scenes and a woven orb. Catalog guidance explains stable keys, ready and experimental designs, retired keys and the design guide.

Documentation

Documentation index · Architecture · API · Frame contract · FAQ · Troubleshooting · Contributing · Security · Changelog

For AI agents

Use the AbstractAvatar skill for the rendering workflow, descriptor constraints and platform integration rules. The LLM index maps the public documentation.