goud_engine/lib.rs
1#![warn(missing_docs)]
2#![warn(rustdoc::all)]
3#![allow(rustdoc::private_intra_doc_links)]
4// Allow common lint warnings in test code
5#![cfg_attr(test, allow(dead_code))]
6#![cfg_attr(test, allow(unused_variables))]
7#![cfg_attr(test, allow(unused_mut))]
8#![cfg_attr(test, allow(unused_unsafe))]
9#![cfg_attr(test, allow(unused_assignments))]
10#![cfg_attr(test, allow(clippy::useless_vec))]
11#![cfg_attr(test, allow(clippy::unnecessary_unwrap))]
12#![cfg_attr(test, allow(clippy::approx_constant))]
13#![cfg_attr(test, allow(clippy::clone_on_copy))]
14#![cfg_attr(test, allow(clippy::unnecessary_cast))]
15#![cfg_attr(test, allow(clippy::unit_cmp))]
16#![cfg_attr(test, allow(clippy::drop_non_drop))]
17#![cfg_attr(test, allow(clippy::bool_assert_comparison))]
18#![cfg_attr(test, allow(clippy::manual_range_contains))]
19#![cfg_attr(test, allow(clippy::single_char_add_str))]
20#![cfg_attr(test, allow(clippy::len_zero))]
21#![cfg_attr(test, allow(clippy::cmp_owned))]
22#![cfg_attr(test, allow(clippy::assertions_on_constants))]
23#![cfg_attr(test, allow(clippy::default_constructed_unit_structs))]
24#![cfg_attr(test, allow(clippy::field_reassign_with_default))]
25
26//! # Goud Engine Core
27//!
28//! This is the core library for the Goud Engine, a lightweight, cross-platform,
29//! and data-oriented game engine written in Rust. It provides a flexible
30//! Entity-Component-System (ECS) architecture, rendering abstractions, asset
31//! management, and an FFI layer for scripting in other languages like C#.
32//!
33//! ## Key Modules
34//!
35//! - [`core`]: Foundational building blocks like error handling, generational
36//! handles, events, and math types.
37//! - [`ecs`]: A full-featured, Bevy-inspired Entity-Component-System. This is
38//! the primary interface for game development.
39//! - [`assets`]: A comprehensive asset management system with hot-reloading.
40//! - [`ffi`]: The Foreign Function Interface for C# and other language bindings.
41//! - [`libs`]: Low-level libraries, currently containing the graphics backend.
42
43pub mod assets;
44pub mod core;
45pub mod ecs;
46#[cfg(feature = "native")]
47pub mod ffi;
48/// Low-level libraries for graphics, platform, and other systems.
49pub mod libs;
50/// High-level Rust-native SDK for game development.
51///
52/// This module provides an ergonomic, zero-overhead API for building games
53/// in pure Rust. Unlike the FFI layer, the SDK is designed for Rust developers
54/// with full type safety and idiomatic APIs.
55///
56/// # Example
57///
58/// ```rust
59/// use goud_engine::sdk::{GoudGame, GameConfig};
60/// use goud_engine::sdk::components::Transform2D;
61/// use goud_engine::core::math::Vec2;
62///
63/// let mut game = GoudGame::new(GameConfig::default()).unwrap();
64/// let player = game.spawn()
65/// .with(Transform2D::from_position(Vec2::new(100.0, 100.0)))
66/// .build();
67/// ```
68pub mod sdk;
69/// WebAssembly bindings for browser-based game development.
70///
71/// Exposes the engine's ECS, input, and timing through `wasm-bindgen`
72/// for consumption by the TypeScript web SDK.
73#[cfg(all(feature = "web", target_arch = "wasm32"))]
74pub mod wasm;