# Oxeon documentation Source: https://oxeon.dev/ . This file is generated from the pages of oxeon.dev, for AI tools and offline reading. Oxeon is a scripting language for modding games made with the [Bevy](https://bevyengine.org) game engine. It uses Rust's syntax and semantics. Mods are `.ox` files: the game loads them as Bevy assets, the Oxeon compiler turns them into WebAssembly, and they run sandboxed in [Wasmtime](https://wasmtime.dev) inside the game's process. A mod's systems use Bevy's own ECS, with the same `Query`, `Res` and schedules as the game's Rust code. Oxeon is open source (MIT or Apache-2.0) and in early development. This guide describes the language as it works today and marks the parts that are still planned. ## At a glance | | | |---|---| | What it is | A Rust-like language for writing mods for Bevy games | | File extension | `.ox` | | Compiles to | WebAssembly, run by Wasmtime with fuel limits (or, in a game built for the web, by the browser's own engine) | | Used from a game through | The `oxeon` crate, a Bevy plugin (`OxeonPlugin`) | | Bevy version | 0.20 | | Implemented in | Rust | | License | MIT OR Apache-2.0 | | Source code | [github.com/kcuwashere/oxeon](https://github.com/kcuwashere/oxeon) | | Editor support | A VS Code extension (`oxeon.oxeon`) and a language server (`oxeon-lsp`) | | Status | Early development (version 0.0.x); not ready for production use | Oxeon isn't a Rust compiler, and it can't use crates from crates.io. A mod can use the language, its small built-in prelude, and whatever types the game exposes. Oxeon is an independent project, not affiliated with or endorsed by the Bevy project. ## A first mod The game adds the plugin and chooses which of its components mods may use: ```rust use bevy::prelude::*; use oxeon::prelude::*; #[derive(Component, Reflect)] #[reflect(Component)] struct Health { current: f32, max: f32, } #[derive(Component, Reflect)] #[reflect(Component)] struct Regen { per_sec: f32, } fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(OxeonPlugin::default()) .expose_to_mods::() .expose_to_mods::() .add_systems(Startup, load_mods) .run(); } fn load_mods(mut commands: Commands, assets: Res) { commands.spawn(OxeonMod(assets.load("mods/regen.ox"))); } ``` The mod uses `Health`, `Regen` and `Time` without declaring them. They come from the game, and the compiler type-checks the mod against their real fields: ```oxeon // assets/mods/regen.ox fn regen(time: Res