UNAVI Docs unavi.xyz
Build · Scripting API

Overview

The scripting API consists of wired:* WIT (WebAssembly Interface Types) packages that scripts use to interact with the host. Each package page in this section is generated directly from the corresponding .wit definition.

PackageScope
wired:coreMath types, IDs, errors, permissions, and shared API conventions
wired:scriptScript lifecycle exports and host permission queries
wired:sceneDocuments, prims, and scene properties
wired:inputPointers, buttons, keys, and targeted prim input
wired:eventLocal messaging between scripts
wired:physicsRaycasts and rigid-body queries
wired:portalOpening, pairing, and traveling through portals
wired:agentLocal user camera, avatar pose, and desktop viewport
wired:peerDocument authors and physics holders
wired:perceptionNearby portals, remote agents, profiles, document metadata, and trust levels
wired:shadingCustom shader graphs
wired:preludeCombined world bundling every package above

The prelude

wired:prelude bundles the entire scripting API into a single world so a script's world.wit only needs to include wired:prelude/script:

package example:wired-input;

world guest {
  include wired:prelude/script;
}

In Rust, the wired-guest crate generates guest bindings for this world.