Skip to content

Plan zero-copy serializer output migration #538

Description

@leynos

Problem

The app outbound encoding helper currently receives Vec<u8> from Serializer::serialize and converts it into bytes::Bytes before wrapping codec frames. This is correct for the current serializer contract, but it prevents a zero-copy outbound path.

Suggested fix

Plan a serializer contract migration that can return Bytes or an equivalent owned byte buffer without forcing an intermediate Vec<u8> allocation. The migration should preserve existing serializer implementations or provide a compatibility shim.

Context

This was surfaced during the 2026-06-05 code-base audit implementation in src/app/outbound_encoding.rs. The current refactor intentionally keeps Serializer::serialize unchanged and tracks the zero-copy migration separately to avoid broad public API churn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions