Crate nightshade

Crate nightshade 

Source
Expand description

§Nightshade

A data-oriented game engine written in Rust.

§Features

  • engine (default) - Full engine functionality including ECS, rendering, physics, and audio.

  • plugins - Minimal guest-side plugin API for WASM plugins. Only includes serialization types.

  • wgpu (default) - WebGPU-based rendering with support for DirectX 12, Metal, Vulkan, and WebGPU backends.

  • openxr - OpenXR support for VR headsets. Enables the xr module for VR development.

  • steam - Steamworks integration for achievements, stats, friends, and multiplayer. Native only.

  • tracing - Enables rolling daily log files written to the logs/ directory. Also enables RUST_LOG environment variable filtering (e.g., RUST_LOG=debug,nightshade::render=trace).

  • tracy - Real-time profiling with Tracy. Requires the Tracy profiler to be running. Shows frame timings, span hierarchy, and performance data live. Implies tracing.

  • chrome - Chrome tracing output. Writes logs/trace.json that can be loaded in chrome://tracing for offline performance analysis. Implies tracing.

See PROFILING.md for detailed profiling documentation including Tracy setup and adding custom instrumentation.

§Example

use nightshade::prelude::*;

struct Game;

impl State for Game {
    fn title(&self) -> &str { "My Game" }
}

fn main() -> Result<(), Box<dyn std::error::Error>> {
    launch(Game)
}

Re-exports§

pub use crate::ecs::audio::systems::*;
pub use crate::ecs::camera::systems::*;
pub use crate::ecs::input::systems::*;
pub use crate::ecs::transform::systems::*;

Modules§

ecs
plugin
prelude
render
run