//! Oxide Engine — scripting module (`oxide-script`).
//!
//! Stage 10 makes game logic live in watched scripts that hot-reload while the
//! editor runs, built on [`rhai`](https://rhai.rs) — an embeddable, sandboxed,
//! Rust-friendly scripting language. It plugs into the engine through the
//! Stage-5 module system: add [`ScriptModule`] to an [`App`](oxide_engine::app::App)
//! and the [`Script`] component becomes live.
//!
//! The design follows the same shape as [`oxide-physics`]: the **ECS is the
//! source of truth**. An entity opts into scripting with one serializable,
//! reflected component —
//! - [`Script`] — *which* `.rhai` script runs on the entity and whether it is
//!   enabled.
//!
//! The script's source is loaded as a [`ScriptAsset`] (kept as plain text so a
//! live edit just recompiles), compiled by the shared [`ScriptEngine`], and run
//! per entity by the host. Because the authored component carries no runtime
//! state, play-mode snapshot/restore (Stage 8.7) works for free.
//!
//! [`oxide-physics`]: https://docs.rs/oxide-physics
//!
//! This first piece lands the component data model, the asset + loader, the
//! engine wrapper, and the module wiring; the lifecycle execution system, the
//! engine type API exposed to scripts, and live reload follow in later pieces.

#![deny(warnings)]

mod asset;
mod bridge;
mod component;
mod engine;
mod host;
mod module;

pub use asset::{ScriptAsset, ScriptLoader};
pub use component::Script;
pub use engine::{CompiledScript, ScriptEngine, ScriptError};
pub use host::ScriptHost;
pub use module::ScriptModule;
