oxgpu/
lib.rs

1//! # Krnl
2//!
3//! `krnl` is a high-level, safe wrapper around `wgpu` for easy GPU compute operations in Rust.
4//! It abstracts away the complexity of managing devices, queues, and bind groups,
5//! providing a fluent API for writing and executing compute kernels.
6//!
7//! ## Example
8//! ```rust,no_run
9//! use krnl::{Context, Buffer, ComputeKernel};
10//! 
11//! #[tokio::main]
12//! async fn main() {
13//!     let ctx = Context::new().await.unwrap();
14//!     let data = vec![1.0f32, 2.0, 3.0];
15//!     let buf = Buffer::from_slice(&ctx, &data).await;
16//!     // ... build and run kernel ...
17//! }
18//! ```
19
20pub mod buffer;
21pub mod compute_kernel;
22pub mod context;
23
24pub use buffer::Buffer;
25pub use buffer::BufferUsage;
26pub use compute_kernel::ComputeKernel;
27pub use compute_kernel::{BindingType, ComputeKernelBuilder, KernelBinding}; // Exposed to user
28pub use context::Context;