From 0fde712f3c0431d3bce10e572748b7bf7ee616ba Mon Sep 17 00:00:00 2001 From: chyyran Date: Wed, 2 Oct 2024 18:07:24 -0400 Subject: [PATCH] doc: update librashader::reflect docs --- librashader/src/lib.rs | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/librashader/src/lib.rs b/librashader/src/lib.rs index 4218c28..ac89b21 100644 --- a/librashader/src/lib.rs +++ b/librashader/src/lib.rs @@ -115,14 +115,13 @@ pub mod preprocess { /// #![feature(type_alias_impl_trait)] /// mod compile { /// use std::error::Error; -/// use librashader_preprocess::ShaderSource; -/// use librashader_presets::ShaderPreset; -/// use librashader_reflect::back::{CompileReflectShader, FromCompilation}; -/// use librashader_reflect::back::targets::SPIRV; -/// use librashader_reflect::front::SpirvCompilation; -/// use librashader_reflect::reflect::cross::SpirvCross; -/// use librashader_reflect::reflect::presets::{CompilePresetTarget, ShaderPassArtifact}; -/// use librashader_reflect::reflect::semantics::ShaderSemantics; +/// use librashader::preprocess::ShaderSource; +/// use librashader::presets::ShaderPreset; +/// use librashader::reflect::{CompileReflectShader, FromCompilation, CompilePresetTarget, ShaderPassArtifact}; +/// use librashader::reflect::targets::SPIRV; +/// use librashader::reflect::SpirvCompilation; +/// use librashader::reflect::cross::SpirvCross; +/// use librashader::reflect::semantics::ShaderSemantics; /// /// type Artifact = impl CompileReflectShader; /// type ShaderPassMeta = ShaderPassArtifact; @@ -141,27 +140,20 @@ pub mod preprocess { /// on `Artifact` is required. /// /// ``` -/// use librashader_reflect::back::CompileReflectShader; -/// use librashader_reflect::back::targets::SPIRV; -/// use librashader_reflect::front::SpirvCompilation; -/// use librashader_reflect::reflect::cross::SpirvCross; -/// use librashader_reflect::reflect::presets::ShaderPassArtifact; +/// use librashader::reflect::CompileReflectShader; +/// use librashader::reflect::targets::SPIRV; +/// use librashader::reflect::SpirvCompilation; +/// use librashader::reflect::cross::SpirvCross; +/// use librashader::reflect::ShaderPassArtifact; /// /// type Artifact = Box + Send>; /// type ShaderPassMeta = ShaderPassArtifact; /// ``` /// /// ## What's with all the traits? -/// librashader-reflect is designed to be frontend and backend agnostic. -/// -/// Currently [SpirvCompilation](crate::reflect::SpirvCompilation), -/// which does compilation of GLSL to SPIR-V via [glslang](https://github.com/KhronosGroup/glslang/) is the only -/// supported frontend. -/// -/// In the future, we will allow [Naga](https://docs.rs/naga/latest/naga/index.html), a pure-Rust shader compiler, -/// as a frontend, when it has matured enough to support [the features librashader needs](https://github.com/gfx-rs/naga/issues/1012). -/// -/// Both naga and SPIRV-Cross are supported as backends depending on the target. +/// librashader-reflect is designed to be compiler-agnostic. [naga](https://docs.rs/naga/latest/naga/index.html), +/// a pure-Rust shader compiler, as well as SPIRV-Cross via [SpirvCompilation](crate::front::SpirvCompilation) +/// is supported. pub mod reflect { /// Supported shader compiler targets. pub mod targets {