1#![allow(private_interfaces)]
4
5extern crate self as galeon_engine;
8
9pub mod archetype;
10pub mod codegen;
11pub mod commands;
12pub mod component;
13pub mod data;
14pub mod deadline;
15pub mod engine;
16pub mod entity;
17pub mod event;
18pub mod function_system;
19pub mod game_loop;
20pub mod handler;
21pub mod handler_function;
22pub mod manifest;
23pub mod particle;
24pub mod protocol;
25pub mod query;
26pub mod render;
27pub mod render_channel;
28pub mod render_event;
29mod resource;
30pub mod route_scanner;
31pub mod schedule;
32pub mod selection;
33pub mod system_param;
34pub mod virtual_time;
35pub mod world;
36
37#[doc(hidden)]
40pub use inventory;
41#[doc(hidden)]
42pub use serde;
43#[doc(hidden)]
44pub use serde_json;
45
46pub use codegen::{generate_descriptors, generate_typescript};
48pub use commands::Commands;
49pub use component::Component;
50pub use data::{DataRegistry, UnitStats, UnitTemplate};
51pub use deadline::{Clock, DeadlineId, Deadlines, SystemClock, TestClock, Timestamp};
52pub use engine::{Engine, Plugin};
53pub use entity::Entity;
54pub use event::{EventReader, EventWriter, Events};
55pub use function_system::{IntoSystem, System};
56pub use galeon_engine_macros::{Component, command, dto, event, handler, query};
57pub use game_loop::FixedTimestep;
58pub use handler::HandlerRegistry;
59pub use handler_function::{
60 Handler, IntoHandler, run_handler, run_json_handler, run_json_handler_function,
61 run_json_handler_value,
62};
63pub use manifest::{
64 FieldEntry, HandlerRegistration, ManifestEntry, ManifestField, ProtocolManifest,
65 ProtocolRegistration,
66};
67pub use particle::{
68 Billboard, ColorDist, Emitter, FloatDist, Particle, ParticleRng, Vec3Dist,
69 emitter_spawn_expire_system,
70};
71pub use protocol::{Command, Dto, Event, ProtocolKind, ProtocolMeta, ProtocolQuery};
72pub use query::{
73 AddedIter, ChangedIter, Mut, NoFilter, Query2Iter, Query2MutIter, Query3Iter, Query3MutIter,
74 QueryFilter, QueryIter, QueryIterMut, QuerySpec, QuerySpecMut, With, Without,
75};
76pub use render::{
77 InstanceOf, MaterialHandle, MeshHandle, ObjectType, ParentEntity, Tint, Transform, Visibility,
78};
79pub use render_channel::{ChannelRegistration, ExtractToFloats, RenderChannelRegistry};
80pub use render_event::{FrameEvent, RenderEvent, RenderEventRegistry};
81pub use route_scanner::{
82 HandlerMeta, ResolvedRoute, ScannedRoute, crate_relative_handler_fn_path, generate_axum_routes,
83 resolve_routes, scan_api_routes, strip_type_prefix,
84};
85pub use schedule::Schedule;
86pub use selection::{PickModifiers, PickPoint, Selection};
87pub use system_param::{Access, Query, QueryMut, Res, ResMut, SystemParam};
88pub use virtual_time::VirtualTime;
89pub use world::{UnsafeWorldCell, World};
90
91pub fn engine_version() -> &'static str {
93 env!("CARGO_PKG_VERSION")
94}
95
96#[cfg(test)]
97mod tests {
98 use super::*;
99
100 #[test]
101 fn version_is_not_empty() {
102 assert!(!engine_version().is_empty());
103 }
104
105 #[test]
106 fn derive_component_compiles() {
107 #[derive(Component)]
108 struct Position {
109 _x: f32,
110 _y: f32,
111 }
112
113 let _pos = Position { _x: 0.0, _y: 0.0 };
114 }
115}