use crate::error::ShaderCompileError;
use librashader_preprocess::ShaderSource;
#[cfg(feature = "unstable-naga")]
mod naga;
mod shaderc;
pub use crate::front::shaderc::GlslangCompilation;
#[cfg(feature = "unstable-naga")]
pub use crate::front::naga::NagaCompilation;
pub trait ShaderCompilation: Sized {
    fn compile(source: &ShaderSource) -> Result<Self, ShaderCompileError>;
}
impl<T: for<'a> TryFrom<&'a ShaderSource, Error = ShaderCompileError>> ShaderCompilation for T {
    fn compile(source: &ShaderSource) -> Result<Self, ShaderCompileError> {
        source.try_into()
    }
}