debra

Zero-overhead compatibility facade for lockfree/smr/nebr (Safe Memory Reclamation)

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 0.11.5
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-11-19 13:57

Authors

  • Elijah Shaw-Rutschman

Installation

nimble install debra
choosenim install debra
git clone https://github.com/elijahr/nim-debra

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
debra ✓ ✓ ✓ - - - - - - -

Dependencies

Package Version Optional
nim >= 2.2.10 No
unittest2 >= 0.2.0 No
lockfree >= 0.6.6 & < 0.7.0 No
typestates >= 0.14.0 & < 0.15.0 No

Source

Repository https://github.com/elijahr/nim-debra
Homepage https://github.com/elijahr/nim-debra
Registry Source nimble_official

README

nim-debra (Compatibility Facade)

[!IMPORTANT]

⚠️ Package Consolidated into lockfree

nim-debra has been merged into canonical lockfree under lockfree/smr/nebr.

All active development, documentation, benchmarks, and SMR engine enhancements take place in lockfree. This repository is maintained strictly as a zero-overhead backwards-compatibility facade for existing Nimble packages. New projects should depend directly on lockfree.

Docs Migration Guide License: MIT


What is this package?

nim-debra continues to exist on Nimble so that existing projects do not break. Under the hood, version 0.11.0+ forwards all calls directly to lockfree/smr/nebr (Neutralization-Enhanced Bounded Reclamation):

# Existing code continues to compile with zero changes:
import debra

var manager: DebraManager[32, ccMulti]
initDebraManager(manager)

var handle = registerThread(manager)
withPin(handle):
  # Protected epoch critical section
  discard

Legacy API Mapping

All historical types, typestate guards, and signal handlers are 100% supported:

Legacy Symbol Modern lockfree Equivalent
DebraManager[MaxThreads, CC] lockfree/smr/nebr.DebraManager
ThreadHandle[MaxThreads, CC] lockfree/smr/nebr.ThreadHandle
registerThread(manager) lockfree/smr/nebr.registerThread
unregisterThread(handle) lockfree/smr/nebr.unregisterThread
withPin(handle, body) lockfree/smr/nebr.withPin
retireNode(handle, ptr) lockfree/smr/nebr.retireNode
reclaimNow(handle) lockfree/smr/nebr.reclaimNow
neutralizeStalled(...) lockfree/smr/nebr.neutralizeStalled

Upgrading to lockfree

To migrate your project to lockfree:

# In your .nimble file:
requires "lockfree >= 0.1.0"
# In your code:
import lockfree/smr/nebr

Read the full Migration Guide and NEBR Documentation.