Skip to main content

Crate goudengine

Crate goudengine 

Source
Expand description

GoudEngine Rust SDK

This crate re-exports the internal goud_engine::sdk module directly. Unlike C#, Python, and TypeScript SDKs which call through the C FFI boundary, the Rust SDK links directly against the engine for zero overhead.

This is a documented exception to the FFI-only rule – Rust calling Rust through C-ABI FFI adds mutex locks and context lookups for zero benefit.

Modules§

collision
SDK Collision Detection API
color
SDK Color Utilities
component_ops
SDK Generic Component Operations API
components
SDK Component Re-exports
components_sprite
SDK Sprite Component Operations
components_transform2d
SDK Transform2D Component Operations
debug_overlay
FPS stats debug overlay with rolling window.
engine_config
High-level engine configuration builder.
entity
SDK Entity Operations API
entity_builder
Fluent entity builder for spawning entities with components.
game
Main game abstraction for Rust-native game development.
game_config
Game configuration and runtime context types.
input
SDK Input API
prelude
Prelude module for convenient imports.
rendering
SDK Rendering API
rendering_3d
SDK 3D Rendering API
scene
Scene management re-exports.
texture
SDK Texture API
window
SDK Window Management API

Structs§

AudioSource
AudioSource component for spatial audio playback.
Children
Component containing a list of child entities.
Collider
Collider component for physics collision detection.
Color
An RGBA color with FFI-safe memory layout.
EngineConfig
Unified engine configuration combining window settings and provider selection.
Entity
A lightweight identifier for an entity in the ECS.
EntityAllocator
Manages entity ID allocation with generation counting and free-list recycling.
EntityBuilder
A fluent builder for creating entities with components.
GameConfig
Configuration for creating a GoudGame instance.
GameContext
Runtime context passed to the game update callback.
GlobalTransform
A world-space transformation component.
GlobalTransform2D
A 2D world-space transformation component.
GoudGame
The main game instance managing the ECS world and game loop.
Mat3x3
A 3x3 transformation matrix for 2D transforms.
Name
Component providing a human-readable name for an entity.
Parent
Component indicating the parent entity of this entity.
Rect
A 2D rectangle with FFI-safe memory layout.
RigidBody
A physics body component for 2D physics simulation.
SceneManager
Manages multiple isolated ECS worlds (scenes).
SparseSet
A sparse set storing values of type T indexed by Entity.
Sprite
A 2D sprite component for rendering textured quads.
Transform
A 3D spatial transformation component.
Transform2D
A 2D spatial transformation component.
Vec2
A 2D vector with FFI-safe memory layout.
Vec3
A 3D vector with FFI-safe memory layout.
Vec4
A 4D vector with FFI-safe memory layout.
World
The central container for all ECS data.

Enums§

AttenuationModel
Audio attenuation model for distance-based volume falloff.
AudioChannel
Audio channel enumeration for audio mixing and grouping.
ColliderShape
The geometric shape of a collider.
GoudError
The main error type for GoudEngine.
RigidBodyType
Defines the physics behavior of a rigid body.

Traits§

Component
Marker trait for types that can be used as ECS components.

Functions§

propagate_transforms
Propagates transforms through the entity hierarchy (3D).
propagate_transforms_2d
Propagates 2D transforms through the entity hierarchy.

Type Aliases§

GoudResult
A specialized Result type for GoudEngine operations.
SceneId
Unique identifier for a scene within a SceneManager.