playout

Crates.ioplayout
lib.rsplayout
version0.1.0
created_at2024-07-27 23:23:34.026512+00
updated_at2024-07-27 23:23:34.026512+00
descriptionDSL for creating Vulkan pipeline layout and descriptor set layout.
homepage
repositoryhttps://github.com/dust-engine/playout
max_upload_size
id1317579
size70,773
PixelDust (PixelDust22)

documentation

https://docs.rs/playout

README

Playout

playout is a Rust library implementing a domain-specific language (DSL) for defining pipeline layouts and descriptor set layouts in a shared format usable by both shading languages and host-side programming languages.

Currently, playout supports generating code for GLSL and Rust.

Benefits

  • Shared Format: Define pipeline and descriptor set layouts once and use them in both shading languages and your host-side code.

  • Improved Readability: Write layouts in a human-readable format instead of boilerplate code.

  • Reduced Errors: Avoid typos and inconsistencies by defining layouts in a single place.

Compile playout to GLSL

let playout_str = "...";
let module = PlayoutModule::try_from(playout_str).unwrap();


let mut writer = String::new();
module.show(&mut writer);
println!("{}", writer)

Compile playout to Rust as a procedural macro

use ash::vk;
// Extract descriptor set 3 from the playout file
let out = playout_macro::layout!("./example.playout", 3);
Commit count: 23

cargo fmt