khora_core/renderer/mod.rs
1// Copyright 2025 eraflo
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Provides the public, backend-agnostic rendering contracts for the Khora Engine.
16//!
17//! This module defines the "common language" for all rendering operations. It contains
18//! the abstract `traits` (like [`GraphicsDevice`]), data structures (like [`BufferDescriptor`]),
19//! and error types that form the stable, public-facing API for rendering.
20//!
21//! Following the CLAD architecture, this module defines the 'what' of rendering,
22//! while the 'how' is handled by a concrete backend implementation in the `khora-infra`
23//! crate (e.g., a WGPU backend) which implements these traits. The `khora-lanes`
24//! and `khora-agents` then use these traits to perform their work without needing to
25//! know the specifics of the underlying graphics API.
26
27pub mod api;
28pub mod error;
29pub mod traits;
30
31// Re-export the most important traits and types for easier use.
32pub use self::api::*;
33pub use self::error::{PipelineError, RenderError, ResourceError, ShaderError};
34pub use self::traits::{GraphicsDevice, RenderSystem};