Skip to content

ZeroPool v0.3.0

Choose a tag to compare

@botirkhaltaev botirkhaltaev released this 23 Nov 15:29
· 25 commits to master since this release

What's New in v0.3.0

Breaking Changes

  • BREAKING: BufferPool::get() now returns PooledBuffer instead of Vec<u8>
    • PooledBuffer implements Deref<Target = Vec<u8>> for transparent access
    • Buffers automatically return to pool when dropped (RAII pattern)
    • No more manual pool.put() calls needed
  • BREAKING: BufferPool::put() is now internal-only (pub(crate))

New Features

  • New PooledBuffer type with automatic buffer return via Drop trait
  • Configurable eviction policies (LIFO, ClockPro) for fine-tuned performance
  • Profiling binaries for performance analysis:
    • ml_checkpoint_loader: ML model loading simulation
    • network_server: Multi-threaded network server simulation
    • file_pipeline: File processing pipeline simulation
    • stress_test: High-stress workload testing
  • Modularized codebase with separate modules

Improvements

  • Removed all unsafe code blocks for improved safety
  • Fixed all clippy warnings and formatting issues
  • Improved code organization and documentation

Migration Guide

Before (v0.2.x):

let buf = pool.get(1024);
// use buf
pool.put(buf); // Manual return

After (v0.3.0):

let buf = pool.get(1024);
// use buf
// Auto-returns on drop!

// For explicit early return:
drop(buf);

See CHANGELOG.md for full details.