Skip to content

chore: orc support - #25

Closed
cnanakos wants to merge 1 commit into
mainfrom
orc-support
Closed

cnanakos wants to merge 1 commit into
mainfrom
orc-support

Conversation

@cnanakos

@cnanakos cnanakos commented Dec 23, 2025 •

Copy link
Copy Markdown

Refactor public API to use var openArray[seq[byte]] instead of raw pointers for ORC compatibility. The previous API required callers to extract raw pointers from seqs before calling encode/decode. With refc and shallowCopy, reference counting kept buffers alive. ORC doesn't track raw pointers and can reallocate seq buffers at yield points, leaving pointers dangling. The new openArray API borrows data safely.

Refactor public API to use `var openArray[seq[byte]]` instead of raw
pointers for ORC compatibility.

The previous API required callers to extract raw pointers from seqs
before calling encode/decode. With refc and shallowCopy, reference
counting kept buffers alive. ORC doesn't track raw pointers and can
reallocate seq buffers at yield points, leaving pointers dangling.

The new openArray API borrows data safely.

Also updates CI to Nim 2.2.4 and bumps version to 0.2.0.

Part of #24

Signed-off-by: Chrysostomos Nanakos <chris@include.gr>
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