mattrobenolt / mattrobenolt/alloconda

Consider typed IO adapters for call boundaries (buffered/unbuffered)

Open
#47 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core
Dominant language
Zig
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Description

We currently accept py.Object for IO helpers and construct IoReader/IoWriter inside call bodies. Explore adding explicit typed adapters (e.g. IoBufferedReader, IoUnbufferedReader, and writer equivalents) that can be passed into py.function parameters, with the call wrapper handling deinit automatically.

Goals:

  • Reduce raw py.Object usage in public APIs
  • Make buffering behavior explicit in types
  • Implement safe fromPy conversions that allocate buffers and are cleaned up after the call
  • Consider a targeted auto-deinit hook in method.zig (only for these IO wrapper types, not user-defined types)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing IoReader and IoWriter construction in call bodies, then inspect py.function parameter handling and the targeted deinit hook area in method.zig. Clarify the adapter and fromPy design before implementation; done means typed buffered and unbuffered reader/writer parameters, safe buffer cleanup after calls, and no deinit behavior for user-defined types.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, zig
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.