Skip to content

[#690] slice api #710

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

Merged
merged 24 commits into from
Apr 30, 2025
Merged

[#690] slice api #710

merged 24 commits into from
Apr 30, 2025

Conversation

elfenpiff
Copy link
Contributor

@elfenpiff elfenpiff commented Apr 29, 2025

Notes for Reviewer

Pre-Review Checklist for the PR Author

  • Add sensible notes for the reviewer
  • PR title is short, expressive and meaningful
  • Consider switching the PR to a draft (Convert to draft)
    • as draft PR, the CI will be skipped for pushes
  • Relevant issues are linked in the References section
  • Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  • Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  • Commits messages are according to this guideline
  • Tests follow the best practice for testing
  • Changelog updated in the unreleased section including API breaking changes
  • Assign PR to reviewer
  • All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Relates to #690

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors and enhances the API for slice-based messaging in the request/response and publish/subscribe code paths. Key changes include:

  • Adding the “+ ?Sized” trait bound to several generic type parameters (e.g. RequestPayload, ResponsePayload) to increase flexibility.
  • Introducing new configuration structs (LocalClientConfig, LocalServerConfig) to consolidate client/server parameters.
  • Adjusting dynamic versus static data segment allocation logic and updating related API calls.

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.

Show a summary per file
File Description
iceoryx2/src/service/port_factory/request_response.rs Updated generic bounds for Request/Response payloads.
iceoryx2/src/service/port_factory/client.rs Introduced LocalClientConfig and refactored client builder fields.
iceoryx2/src/service/header/* Minor documentation and signature updates related to number of elements.
iceoryx2/src/port/* Updated castings for unsized payloads and revised data segment allocation logic.
Other files Consistent addition of “+ ?Sized” generics and adjustments to helper functions in response/request modules.
Comments suppressed due to low confidence (2)

iceoryx2/src/service/port_factory/request_response.rs:64

  • Adding the '+ ?Sized' bound increases flexibility for unsized types; please verify that all downstream usages (such as transmute calls or slice operations) are compatible with unsized types to avoid subtle memory issues.
RequestPayload: Debug + ZeroCopySend + ?Sized,

iceoryx2/src/service/port_factory/client.rs:132

  • The default value for 'initial_max_slice_len' is hardcoded to 1; please ensure that this value is intentional and does not lead to unexpected behavior in slice-based API usage.
initial_max_slice_len: 1,

@elfenpiff elfenpiff merged commit 6b05583 into eclipse-iceoryx:main Apr 30, 2025
52 checks passed
@elfenpiff elfenpiff deleted the iox2-690-slice-api branch April 30, 2025 12:38
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