Crate oxgpu

Crate oxgpu 

Source
Expand description

§Krnl

krnl is a high-level, safe wrapper around wgpu for easy GPU compute operations in Rust. It abstracts away the complexity of managing devices, queues, and bind groups, providing a fluent API for writing and executing compute kernels.

§Example

use krnl::{Context, Buffer, ComputeKernel};
 
#[tokio::main]
async fn main() {
    let ctx = Context::new().await.unwrap();
    let data = vec![1.0f32, 2.0, 3.0];
    let buf = Buffer::from_slice(&ctx, &data).await;
    // ... build and run kernel ...
}

Re-exports§

pub use buffer::Buffer;
pub use buffer::BufferUsage;
pub use compute_kernel::ComputeKernel;
pub use compute_kernel::BindingType;
pub use compute_kernel::ComputeKernelBuilder;
pub use compute_kernel::KernelBinding;
pub use context::Context;

Modules§

buffer
compute_kernel
context