ashlar

Procedural architecture for Rust games.

Describe a building as ordinary Rust data and its materials as Rust graphs. A content step bakes both into files, and your Bevy game loads them with levels of detail, collision proxies and rooms — no macro language, no style built into the engine, and no geometry kernel or graph engine in the game you ship.

Scenes

A dark city by night, a corporate courtyard, a house you can cut open storey by storey, a sci-fi colony — each a baked .ashlar file drawn with its level-of-detail bands, exactly as a game loads it.

Materials

The default library of forty surfaces on a sphere and a wall. Move a parameter and the graph re-bakes in your browser, on one thread, in a few seconds.

Two halves

The content step links the mesher and the material engine; the game links neither. ashlar-bevy with default features loads files and nothing else.

let building = Building::builder("example:screen")
    .part(panel)
    .material("surface", "library:painted-metal")
    .instance(Instance::new("left", "example:panel"))
    .instance(Instance::new("right", "example:panel").placed(Pose::at([4.0, 0.0, 0.0])))
    .build()?;
// The content step meshes it at every level of detail; the game spawns it with one component.