Annessaia – a sandboxed WASM app runtime with its own UI toolkit

virenmane1 pts0 comments

GitHub - vm100900/annessaia · GitHub

/" data-turbo-transient="true" />

Skip to content

Type / to search

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

vm100900

annessaia

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

master

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>13 Commits<br>13 Commits

annessaia

annessaia

apps

apps

directory

directory

docs/superpowers

docs/superpowers

games/prism

games/prism

my-game

my-game

my-learning

my-learning

sdk

sdk

server

server

testing

testing

tools

tools

.gitignore

.gitignore

Cargo.lock

Cargo.lock

Cargo.toml

Cargo.toml

README.md

README.md

build.sh

build.sh

tunnel.sh

tunnel.sh

View all files

Repository files navigation

annessaia

A sandboxed WASM app runtime with its own UI toolkit — apps are compiled Rust,<br>not HTML/JS, run by a native desktop host (annessaia) through a small<br>widget/GPU API. Apps are hosted on nodes : lightweight servers<br>(annessaia-server) that index, gossip, and serve apps to each other and to<br>the desktop host, forming a small decentralized-ish app registry rather than<br>depending on one central store.

┌─────────────┐ fetches .wasm ┌──────────────────┐ gossips over WS ┌──────────────────┐<br>│ annessaia │ ────────────────▶│ annessaia-server │◀───────────────────▶│ annessaia-server │<br>│ (desktop app)│ │ (a node) │ │ (another node) │<br>└─────────────┘ └──────────────────┘ └──────────────────┘

Quickstart

Requires a recent Rust toolchain (rustup.rs).

cd annessaia<br>./build.sh # builds every example WASM app into dist/">git clone this repo><br>cd annessaia<br>./build.sh # builds every example WASM app into dist/

Then, in two terminals:

# Terminal 1 — run a node (serves apps, indexes/search, gossip)<br>cargo run -p annessaia-server

# Terminal 2 — run the desktop app<br>cargo run -p annessaia --release

The desktop app opens to a hosted public search/registry by default. Paste<br>one of these into its address bar to try the bundled examples against your<br>own local node instead:

http://localhost:3000/nova.wasm NOVA — mouse-only survival game<br>http://localhost:3000/search.wasm the app registry: search + submit<br>http://localhost:3000/admin.wasm node admin: password-protected<br>http://localhost:3000/gpu.wasm low-level GPU-primitive demo<br>http://localhost:3000/pixel.wasm pixel-art paint tool<br>http://localhost:3000/widgets.wasm live reference for every SDK widget

The first time annessaia or annessaia-server runs, it downloads a small<br>on-device embedding model (~1.3GB) so search can rank by meaning, not just<br>keywords. This is entirely optional:

the desktop app asks once, on first launch, whether to enable it — change<br>your mind later from the toggle in its nav bar

a node operator controls it server-wide from the admin panel (see below),<br>or by building with --no-default-features to drop the dependency<br>(fastembed) entirely

Writing your own app

cargo run -p annessaia-cli -- new my-app<br>cd my-app<br>cargo run -p annessaia-cli -- build # → my-app.wasmh

(Or install the CLI once with cargo install --path tools/annessaia and use<br>annessaia new/annessaia build directly.)

An app is just a #[no_mangle] pub extern "C" fn render() (or render_gpu()<br>/ render_pixels(w, h) for lower-level drawing) built against<br>annessaia_sdk:

use annessaia_sdk::prelude::*;

#[no_mangle]<br>pub extern "C" fn render() {<br>heading("Hello, annessaia!");<br>label("A WASM app written in Rust.");<br>if button("Click me") {<br>// ...

apps/widgets is a live reference for every widget the SDK offers, each<br>paired with the exact call that produced it — open it in the desktop app and<br>read the source side by side. The other apps/* crates are worked examples<br>at increasing complexity: apps/calculator (basic layout + state),<br>apps/keys (the full input API), apps/gpu/apps/pixel (drawing below the<br>widget layer), apps/nova (a small real-time game), apps/search and<br>apps/admin (talking to a node's HTTP API).

Running your own node

cargo run -p annessaia-server

Configuration is via environment variables:

Variable<br>Meaning<br>Default

PORT<br>port to listen on<br>3000

ANNESSAIA_URL<br>this node's own public base URL<br>http://localhost:$PORT

ANNESSAIA_DATA<br>where to persist state<br>./data

ANNESSAIA_PEERS<br>comma-separated peer URLs to gossip with<br>(none)

ANNESSAIA_DIRECTORY<br>bootstrap directory, for discovering peers<br>the public bootstrap Worker

Open http://localhost:$PORT/admin.wasm in the desktop app to manage the<br>node — apps, peers, and the public directory listing. The admin panel is<br>password-protected: the first time you open it, it asks you to set a<br>password (bcrypt-hashed on disk, never stored in plaintext); every launch<br>after that asks you to log in,...

annessaia apps wasm cargo node server

Related Articles