| Crates.io | obwio |
| lib.rs | obwio |
| version | 0.3.0 |
| created_at | 2025-09-27 20:21:33.195212+00 |
| updated_at | 2025-11-16 08:43:28.603873+00 |
| description | OpenCL bindings and runtime utilities for Rust |
| homepage | |
| repository | https://github.com/muhammadmahdi70412-ship-it/obwio |
| max_upload_size | |
| id | 1857604 |
| size | 452,100 |
OBWIO (OpenCL But With Iron Oxide) is a Rust crate that provides low-level bindings to the OpenCL API, enabling direct access to GPU compute functionality across platforms. It is designed for developers who want full control over OpenCL without relying on high-level abstractions or wrappers.
OBWIO exposes the raw OpenCL interface through auto-generated Rust bindings. These bindings allow you to interact with OpenCL devices, contexts, buffers, and kernels directly, making it suitable for performance-critical applications such as graphics engines, machine learning frameworks, and custom GPU runtimes.
bindgenAdd OBWIO to your Cargo.toml:
[dependencies]
obwio = "0.1"
use obwio::clGetPlatformIDs;
fn main() {
unsafe {
let mut num_platforms = 0;
let err = clGetPlatformIDs(0, std::ptr::null_mut(), &mut num_platforms);
println!("Found {} OpenCL platforms (err code: {})", num_platforms, err);
}
}
If you don't want to go through the trouble of pure bindings, use OBRAH. OBRAH is built on OBWIO, and provides a high-level interface for OpenCL in Rust.
Rust 1.70 or later
OpenCL SDK installed on your system
Compatible OpenCL runtime and drivers
Licensed under:
Contributions are welcome. If you're building a wrapper or using OBWIO in a larger project, feel free to open issues or submit pull requests.
OBWIO uses bindgen to generate FFI bindings and depends on the Khronos OpenCL headers. Thanks to the Rust and OpenCL communities for their documentation and tooling support.