Skip to content

Spike static-liburing ring lifecycle - #15

Closed
bright2227 wants to merge 1 commit into
agent/add-uringcore-skeletonfrom
feature/static-liburing-ring-spike
Closed

Spike static-liburing ring lifecycle#15
bright2227 wants to merge 1 commit into
agent/add-uringcore-skeletonfrom
feature/static-liburing-ring-spike

Conversation

@bright2227

Copy link
Copy Markdown
Owner

Stack

This PR replaces #14 after renaming its head branch to follow the repository's feature/ naming convention. It is stacked on #13 and targets agent/add-uringcore-skeleton. Review only commit 467543c; after #13 merges, this PR can be retargeted to main.

What changed

  • add _uringcore_liburing.Ring with the same lifecycle API as the raw-syscall spike
  • initialize and tear down rings through the pinned liburing submodule
  • statically link libs/src/liburing.a, avoiding a runtime liburing.so dependency for this module
  • add equivalent lifecycle and queue-size validation tests
  • package liburing's MIT notice
  • record the initial development-build size comparison

Why

Phase 1 requires both viable ring-management routes to be spiked before selecting the production native core. This gives the raw-syscall and static-liburing routes the same API and test boundary so the next decision record can compare them directly.

Impact

The existing CFFI proactor remains active, so there is no user-facing event-loop behavior change.

Review has identified one blocking packaging issue that remains to be fixed: the published sdist omits libs/src/liburing.a and the vendored inputs needed to build it. A clean build from that sdist currently fails at link time. The branch is therefore kept as a draft.

The local CPython 3.12 x86-64 development builds measured 35,152 bytes for raw syscalls and 109,840 bytes for static liburing. Release-build measurements are still required.

Validation

  • /usr/bin/gcc -fsyntax-only -Wall -Wextra -Werror -I/usr/include/python3.12 -Ilibs/src/include src/uringcore_liburing.c
  • .venv/bin/ruff check setup.py tests/unit/test_uringcore_liburing.py uringloop/_uringcore_liburing.pyi
  • .venv/bin/ruff format --check setup.py tests/unit/test_uringcore_liburing.py uringloop/_uringcore_liburing.pyi
  • .venv/bin/mdformat --check docs/phase1-static-liburing-spike.md
  • .venv/bin/pytest tests/ -v — 33 passed from the prepared checkout
  • uv build --wheel --sdist
  • ldd uringloop/_uringcore_liburing.cpython-312-x86_64-linux-gnu.so — libc only; no liburing dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant