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

[v23.3.x] transform-sdk/rust: borrow output record #16294

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #16210

We only need to borrow the output record. To do that we make the writer
take `Into<BorrowedRecord<'_>>`, so that it can take any type of record
for transforms (we can now do no copy transforms!).

Since `Into<_>` is a trait, we can't have a monomorphic trait take a
monomorphic trait as a function argument (see
https://doc.rust-lang.org/reference/items/traits.html#object-safety). So
we wrap our current trait in a struct that handles resolving the trait
argument to the concrete type our write function will take.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
(cherry picked from commit 6cd47a8)
Reuse input and output buffers for better performance.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
(cherry picked from commit b5c5806)
Add the same docs we have for Golang, but in Rust.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
(cherry picked from commit 66b3aed)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Jan 26, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 26, 2024
@github-actions github-actions bot added area/rpk area/wasm WASM Data Transforms labels Jan 26, 2024
@rockwotj
Copy link
Contributor

CI Failures: #16026

@rockwotj rockwotj merged commit dbe65b2 into redpanda-data:v23.3.x Jan 26, 2024
24 of 26 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.6 Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk area/wasm WASM Data Transforms kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants