Oxeon / Examples
Examples
Start with Mods that run today: complete mods from Oxeon's test suite. The other examples each cover one part of the language. They show the full design, including parts that aren't implemented yet, and each page says what works today.
Mods that run today
Works todayComplete Oxeon mods that run in a Bevy game today: health regeneration, Commands, query filters, resources, messages, components defined by a mod, enums, closures, and what happens when a mod loops forever or has a type error.
Basics
Partly works todayBindings, functions, literals, control flow, loops and labels in Oxeon, a Rust-like language for Bevy mods.
Structs and enums
Partly works todayStructs, tuple and unit structs, enums whose variants carry data, impl blocks, methods and associated constants in Oxeon.
Pattern matching
Partly works todaymatch, guards, @ bindings, ranges, slice patterns, if let and let-else in Oxeon.
Traits and generics
Partly works todayTraits, default methods, associated types, trait bounds, impl Trait and dyn Trait in Oxeon.
Ownership and borrowing
Partly works todayMoves, borrows, lifetimes and Drop in Oxeon, which follows Rust’s ownership rules.
Closures and iterators
Partly works todayClosures, move closures, Fn bounds and iterator chains in Oxeon.
Error handling
Partly works todayResult, Option, the ? operator, custom error enums and panics in Oxeon, where a panic stops only the mod.
Modules
Partly works todayModules, visibility, use imports and file modules in Oxeon.
Compile-time evaluation
Partly works todayconst, static, const fn, const blocks and const generics in Oxeon.
Async and await
Plannedasync functions, .await on host operations and background tasks in Oxeon mods, driven by the game’s executor.
Bevy ECS in a mod
Partly works todayComponents, resources, messages, systems, queries and the plugin entry point in an Oxeon mod for a Bevy game.
Reflection
PlannedField access by name and runtime trait queries through bevy_reflect in an Oxeon mod.
Macros
Plannedmacro_rules! and procedural macros that run sandboxed at compile time in Oxeon.
WebAssembly instructions
Partly works todayWebAssembly instructions in Oxeon through Rust’s primitive methods (count_ones, sqrt, rotate_left, to_bits) and core::arch::wasm32.