oxicuda-runtime
Part of the OxiCUDA ecosystem — Pure Rust CUDA replacement for the COOLJAPAN ecosystem.
Overview
oxicuda-runtime is a Pure Rust implementation of the CUDA Runtime API (libcudart) surface, built on top of oxicuda-driver's dynamic driver loader. It exposes ergonomic Rust types for streams, events, device pointers, and kernel dimensions, covering the full breadth of commonly used cudaXxx functions — without any CUDA SDK build-time dependency.
Features
- Device management —
cudaGetDeviceCount,cudaSetDevice,cudaGetDeviceProperties,cudaDeviceSynchronize,cudaDeviceReset - Memory —
cudaMalloc,cudaFree,cudaMallocHost,cudaMallocManaged,cudaMallocPitch,cudaMemcpy,cudaMemcpyAsync,cudaMemset,cudaMemGetInfo - Streams — Create/destroy/synchronize CUDA streams with priority and flag support
- Events —
cudaEventCreate,cudaEventRecord,cudaEventSynchronize,cudaEventElapsedTime - Kernel launch —
cudaLaunchKernel,cudaFuncGetAttributes, PTX module loading/unloading - Peer access — Multi-GPU peer memory copies and access enable/disable
- Profiler —
cudaProfilerStart/cudaProfilerStopwith aProfilerGuardRAII wrapper - Texture & surface objects — Full
CudaTextureObject,CudaSurfaceObject, array descriptors
Usage
Add to your Cargo.toml:
[]
= "0.1.3"
use ;
// Select device 0
set_device?;
// Allocate 1 MiB of device memory and zero it
let d_buf = malloc?;
memset?;
// Create a stream and record an event
let s = stream_create?;
let e = event_create?;
event_record?;
event_synchronize?;
// Cleanup
event_destroy?;
stream_destroy?;
free?;
Status
| Item | Value |
|---|---|
| Version | 0.1.3 (2026-04-17) |
| Tests | 46 passing |
| Warnings | 0 |
unwrap() |
0 |
License
Apache-2.0 — © 2026 COOLJAPAN OU (Team KitaSan)