Skip to content

Spike raw-syscall native ring lifecycle - #13

Closed
bright2227 wants to merge 2 commits into
mainfrom
agent/add-uringcore-skeleton
Closed

Spike raw-syscall native ring lifecycle#13
bright2227 wants to merge 2 commits into
mainfrom
agent/add-uringcore-skeleton

Conversation

@bright2227

Copy link
Copy Markdown
Owner

What changed

  • add an importable uringloop._uringcore CPython extension
  • add a native Ring type that owns io_uring_setup, SQ/CQ mappings, SQE mappings, and deterministic teardown
  • expose an ABI version and typing stub
  • package the C source in sdists and the extension in wheels
  • document this as the raw-syscall route spike and keep the existing CFFI proactor unchanged

Why

Phase 1 of the roadmap requires evaluating raw kernel syscalls against a statically linked vendored liburing backend before choosing the production native core. This is the smallest useful first spike: it establishes and tests the ring lifecycle boundary without mixing in submission, completion, or native request-state work.

Impact

There is no user-facing event-loop behavior change. The current CFFI implementation remains the active backend and behavioral oracle. The new _uringcore extension does not dynamically link to liburing; the static-liburing counterpart and final decision record remain follow-up work.

Validation

  • x86_64-linux-gnu-gcc -fsyntax-only -Wall -Wextra -Werror -I/usr/include/python3.12 src/uringcore.c
  • .venv/bin/ruff check setup.py tests/unit/test_uringcore.py uringloop/_uringcore.pyi
  • .venv/bin/ruff format --check setup.py tests/unit/test_uringcore.py uringloop/_uringcore.pyi
  • .venv/bin/pytest tests/ -v — 21 passed
  • uv build --wheel --sdist
  • ldd uringloop/_uringcore.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