Skip to main content

Crates

One section per workspace crate: what it is for, what it depends on inside the workspace, and what it exports.

balaur

Balaur game engine: batteries-included facade over the core and standard plugins

Batteries-included entry points for Balaur games and tools.

  • workspace deps: balaur_anim, balaur_audio, balaur_core, balaur_gamend, balaur_input, balaur_net, balaur_physics, balaur_plugin, balaur_render, balaur_script, balaur_script_rune, balaur_ui
  • external deps: 3 (anyhow, toml, tracing)
  • public surface: 8 fn

balaur_android

The Android entry point: a NativeActivity library that boots a packed game

The Android entry point.

  • workspace deps: balaur
  • external deps: 2 (kiss3d, tracing)
  • public surface: nothing public

balaur_anim

Balaur animation plugin: clips, sampling and fixed-step playback

Animation as a Balaur plugin: clips, a pure sampler, and playback.

  • workspace deps: balaur_core, balaur_script
  • external deps: 5 (anyhow, glamx, libm, toml, tracing)
  • public surface: 27 fn, 9 struct, 6 enum, 1 const, 2 type
  • structs: AnimationPlugin, AnimationState, Clip, Easing, Key, Modifier2d, Playback, Track, Tween
  • enums: Interp, Mode, Property, TrackValue, Transition, Wrap

balaur_audio

Balaur audio plugin backed by rodio

Audio as a Balaur plugin, backed by rodio.

  • workspace deps: balaur_core, balaur_plugin, balaur_script
  • external deps: 5 (anyhow, rodio, toml, tracing, windows-sys)
  • public surface: 2 fn, 3 struct
  • structs: AudioPlugin, AudioState, Sound

balaur_bench

Benchmarks: where a frame's time goes, and what each language costs

Shared setup for the benchmarks: build a project on disk, boot an app on a chosen backend, attach scripts to N nodes.

  • workspace deps: balaur, balaur_core, balaur_physics, balaur_script, balaur_script_rune
  • external deps: 4 (anyhow, hecs, tempfile, toml)
  • public surface: 2 fn, 1 struct, 1 enum
  • structs: Project
  • enums: Backend

balaur_cli

The balaur command line tool: create, run, export, and play projects.

  • workspace deps: balaur
  • external deps: 12 (anyhow, clap, dirs, flate2, serde_json, sha2, tar, tracing, …)
  • public surface: 1 fn

balaur_core

Balaur engine core: ECS world, scene tree, frame scheduler, plugin API

Balaur engine core: the ECS world every plugin builds on.

  • workspace deps: balaur_script
  • external deps: 15 (anyhow, dirs, glamx, gltf, hecs, indexmap, libm, rustc-hash, …)
  • public surface: 109 fn, 65 struct, 7 enum, 1 trait, 18 const, 17 type
  • traits: Plugin
  • structs: App, AppConfig, AssetState, AssetType, AssetTypeRegistry, Bone, Children, ComponentDef, ComponentRegistry, DebugLineBuffer, DebugLineBuffer2d, Digest, DigestRegistry, Divergence, Engine, EngineOp, Entry, Event, EventLog, ExternalIo, Frame, GlbImport, GlobalTransform, Hasher, Header, HeightfieldData, IdAllocator, LogEntry, ManifestSource, MeshData, MeshSkin, Name, NodeOp, Origin, Pack, Parent, Pcg32, PresetDef, PresetPart, PresetRegistry, ProjectFiles, ProjectManifest, ProjectRoot, Recorder, Recording, ReplayFeed, ReplayPlayer, ReplayRegistry, ReplaySetupRegistry, Resources, RngState, SceneAsset, SceneKeyRegistry, ScriptArgs, ScriptAttachment, ScriptSetup, Server, Session, Snapshot, SnapshotRegistry, SnapshotRing, StableId, Trailer, Transform, VoxelsData
  • enums: AssetRef, AssetSource, Command, PlayState, ReplayMode, Stage, Step

balaur_gamend

Balaur plugin for the Gamend backend: login, REST, realtime and server hooks for scripts

The Gamend backend as a Balaur plugin: gamend.* for scripts.

  • workspace deps: balaur_core, balaur_plugin, balaur_script
  • external deps: 6 (anyhow, serde, serde_json, tracing, tungstenite, ureq)
  • public surface: 2 fn, 8 struct, 3 enum
  • structs: Client, GamendPlugin, GamendSnapshot, GamendState, Handler, Reply, Session, Socket
  • enums: Credentials, LoginCredentials, SocketEvent

balaur_input

Balaur input plugin: backend-agnostic input state and the input Lua module

Input as a Balaur plugin.

  • workspace deps: balaur_core, balaur_script
  • external deps: 6 (anyhow, gilrs, serde, serde_json, toml, tracing)
  • public surface: 1 fn, 5 struct, 1 enum, 4 const
  • structs: GamepadState, InputActions, InputPlugin, InputSnapshot, Pad
  • enums: TouchPhase

balaur_net

Balaur networking plugin: http requests and websocket connections for scripts

Networking as a Balaur plugin: http.* and websocket.* for scripts.

  • workspace deps: balaur_core, balaur_plugin, balaur_script
  • external deps: 12 (anyhow, flate2, httparse, rand, rustls, serde, serde_json, toml, …)
  • public surface: 7 struct
  • structs: Handler, HttpCall, NetConfig, NetPlugin, NetSnapshot, NetState, SocketOptions

balaur_physics

Balaur plugin wrapping the Rapier physics engine

Rapier physics as a Balaur plugin.

  • workspace deps: balaur_core, balaur_script
  • external deps: 11 (anyhow, glamx, parry2d, parry3d, rapier2d, rapier3d, rayon, serde, …)
  • public surface: 5 fn, 12 struct, 2 enum, 4 const
  • structs: Character2d, Character3d, JointRef, JointRef2d, PhysicsDebugConfig, PhysicsDebugState, PhysicsPlugin, PhysicsState, PhysicsState2d, Vehicle3d, Wheel3d, WheelInput
  • enums: JointHandle, JointHandle2d

balaur_plugin

What a module or an extension implements to register itself with the engine

What a module or an extension implements to register itself.

  • workspace deps: balaur_core, balaur_script
  • external deps: 4 (anyhow, libloading, serde_json, tracing)
  • public surface: 6 fn, 14 struct, 1 trait, 18 const, 1 type
  • traits: Plugin
  • structs: AbiTag, BalaurApi, BalaurEntry, BalaurMapRef, BalaurModule, BalaurRegistry, BalaurSlice, BalaurStr, BalaurValue, CExtension, Extension, Fingerprint, Manifest, Registry

balaur_render

Balaur rendering plugin: renderable components, with a kiss3d backend

Rendering as a Balaur plugin.

  • workspace deps: balaur_core, balaur_input, balaur_script, balaur_ui
  • external deps: 14 (anyhow, bytemuck, glamx, image, kiss3d, libm, objc2, objc2-app-kit, …)
  • public surface: 14 fn, 29 struct, 5 enum, 5 const
  • structs: AppIconConfig, Bounds, Camera, CameraConfig, CameraConfig2d, CameraInputConfig, ChannelView, ClearColorConfig, Compiled, Field, GridConfig, Material, Particles, PolygonMesh, Preview, PreviewRequest, RenderPlugin, Renderable, Renderable2d, ScreenshotRequest, ShaderModules, SpriteSheet2d, SpriteTexture, Tilemap, Tileset, ViewportSnapshot, ViewportSnapshot2d, WindowConfig, WindowedBackend
  • enums: CameraKind, FieldType, Param, Shape, Shape2d

balaur_script

Language-neutral scripting seam: traits only, no backend.

The scripting seam: traits only, no backend.

  • workspace deps: none
  • external deps: 2 (anyhow, serde)
  • public surface: 1 fn, 5 struct, 3 enum, 8 trait, 2 type
  • traits: Bindings, BindingsExt, CallbackHost, FromArg, FromArgs, IntoValue, ScriptCompiler, ScriptHost
  • structs: CallbackId, Frame, NoBindings, NodeId, Pause
  • enums: PauseReason, StepMode, Value

balaur_script_rune

The Rune script host: loading, instancing, hot reload, precompiled packs.

  • workspace deps: balaur_core, balaur_script
  • external deps: 6 (anyhow, hecs, indexmap, notify, rune, tracing)
  • public surface: 3 fn, 10 struct
  • structs: ApiEntry, Color, Component, Finding, FnEntry, Node, RuneHost, RuneModule, Vec2, Vec3

balaur_ui

Balaur UI plugin: an immediate-mode egui API for scripts

Immediate-mode UI for scripts, rendered with egui.

  • workspace deps: balaur_core, balaur_script
  • external deps: 5 (anyhow, egui, image, toml, tracing)
  • public surface: 1 fn, 6 struct, 4 const
  • structs: ThemeTokens, UiConfig, UiPlugin, UiState, Widget, WidgetLayerConfig