Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindings/go Support blob types in query arguments, free non-gc allocations #822

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

PThorpe92
Copy link
Contributor

This PR fixes/adds support for the Blob type and adds the appropriate tests.

Types created on the Go side will be cleaned up rather quickly if nothing is referencing them, so this approach uses runtime.Pinner to pin the bytes in memory so the pointers will be valid when Rust uses from_raw_parts and then owns a new vec. They are then cleaned up after the FFI call with pinner.Unpin.

@penberg penberg merged commit d25ccf0 into tursodatabase:main Jan 30, 2025
38 of 39 checks passed
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.

2 participants