#vulkan #gpu #memory-allocator #graphics

memkit-gpu

Backend-agnostic GPU memory management for memkit

4 releases

0.2.0-beta.1 Feb 2, 2026
0.1.1-beta.1 Feb 2, 2026
0.1.0-beta.1 Feb 2, 2026
0.1.0-alpha.1 Dec 27, 2025

#383 in Memory management


Used in 2 crates

MPL-2.0 license

220KB
4.5K SLoC

◈ MEMKIT GPU ◈

[ HARDWARE-AGNOSTIC GPU MEMORY LAYER ]

Crates.io Documentation License


 ██████╗ ██████╗ ██╗   ██╗
██╔════╝ ██╔══██╗██║   ██║
██║  ███╗██████╔╝██║   ██║
██║   ██║██╔═══╝ ██║   ██║
╚██████╔╝██║     ╚██████╔╝
 ╚═════╝ ╚═╝      ╚═════╝ 

"Heterogeneous memory management without the friction."

Type-safe, backend-agnostic GPU memory management for the Memkit ecosystem. Bridge the gap between CPU-visible staging and device-local hardware memory.

QUICK STARTBACKENDSARCHITECTURE


◈ THE GPU ADVANTAGE

Feature Standard Global Memkit GPU Results
Latency Jitter-prone Deterministic Frame consistency
Backend Native-only Multi-backend Cross-platform
Safety Manual pointers Type-safe No memory leaks
Transfers Ad-hoc Batched Minimized stalls

◈ FEATURES

┌─────────────────────────────────────────────────────────────────────────┐
│  ◆ STAGING     │  Explicit management of CPU-visible memory. Optimized  │
│                │  for fast uploads and data streaming.                   │
├─────────────────────────────────────────────────────────────────────────┤
│  ◆ DEVICEGPU-local memory allocation. Type-safe buffers for    │
│                │  Vertices, Indices, and Unifroms.                      │
├─────────────────────────────────────────────────────────────────────────┤
│  ◆ BATCHING    │  Coalesced transfers to minimize command buffer        │
│                │  recording overhead.                                   │
└─────────────────────────────────────────────────────────────────────────┘

◈ QUICK START

use memkit_gpu::{MkGpu, MkBufferUsage, DummyBackend};

// Initialize with Dummy backend for simulation
let gpu = MkGpu::new(DummyBackend::new());

// Create staging buffer (CPU-visible)
let vertices: &[f32] = &[0.0, 1.0, 0.0, 1.0, 0.0, 0.0];
let staging = gpu.staging_buffer_with_data(vertices).unwrap();

// Create device-local buffer (GPU-fast)
let device = gpu.create_device_buffer(
    std::mem::size_of_val(vertices),
    MkBufferUsage::VERTEX | MkBufferUsage::TRANSFER_DST,
).unwrap();

// Batch transfer from Staging to Device
gpu.transfer(&staging, &device).unwrap();

◈ SUPPORTED BACKENDS

Backend Feature Flag Status
Vulkan vulkan PRODUCTION READY
Dummy (default) TEST READY
Metal metal 🚧 COMING SOON
DX12 dx12 🚧 COMING SOON

To enable Vulkan:

memkit-gpu = { version = "0.2.0-beta.1", features = ["vulkan"] }

◈ ARCHITECTURE

graph TD
    User([User Application]) --> Core[MkGpu]
    Core --> Backend{MkGpuBackend}
    Backend -->|ash| Vulkan[Vulkan Engine]
    Backend -->|simulation| Dummy[Dummy Engine]
    Vulkan --> Hardware[[Physical GPU]]

◈ LICENSE

Licensed under the Mozilla Public License 2.0.


[ Part of the ◈ MEMKIT ◈ Ecosystem ]

Dependencies

~0.1–1.6MB
~36K SLoC