Skip to content

Conversation

orecham
Copy link
Contributor

@orecham orecham commented Oct 16, 2025

Notes for Reviewer

Updates all crates to explicitly use components in core and alloc.

All crates were updated except for the following (to be done in a follow-up):

  1. iceoryx2-cli

Additionally, the following changes were added to fix some quirks that were uncovered:

  1. Logging
    1. Remove indentation in log output when origin is not provided
    2. Print log message on first line when origin is not provided
    3. Remove | character from log output when origin is not provided
    4. Add a null logger default which does nothing

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 #865

@orecham orecham force-pushed the iox2-865-support-nostd-builds branch 3 times, most recently from 7d06972 to bf7bf1f Compare October 16, 2025 01:04
@orecham orecham changed the title WIP: [#865] Make iceoryx2 no_std WIP Oct 16, 2025
@orecham orecham changed the title WIP [WIP] Oct 16, 2025
@orecham orecham force-pushed the iox2-865-support-nostd-builds branch 6 times, most recently from 1327493 to c3eff64 Compare October 16, 2025 01:43
@orecham orecham self-assigned this Oct 16, 2025
@orecham orecham force-pushed the iox2-865-support-nostd-builds branch 2 times, most recently from 7d1e3f0 to 6ff1509 Compare October 16, 2025 04:50
@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 56.25000% with 77 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.27%. Comparing base (25748b4) to head (89a979f).

Files with missing lines Patch % Lines
iceoryx2-bb/log/src/lib.rs 0.00% 29 Missing ⚠️
iceoryx2-bb/posix/src/thread.rs 0.00% 15 Missing ⚠️
iceoryx2-bb/log/src/logger/null.rs 0.00% 14 Missing ⚠️
iceoryx2-bb/posix/src/config.rs 0.00% 6 Missing ⚠️
iceoryx2-pal/concurrency-sync/src/once.rs 90.90% 4 Missing ⚠️
iceoryx2/src/port/reader.rs 0.00% 2 Missing ⚠️
iceoryx2/src/port/writer.rs 0.00% 2 Missing ⚠️
iceoryx2-bb/linux/src/signalfd.rs 0.00% 1 Missing ⚠️
iceoryx2-bb/log/src/logger/console.rs 66.66% 1 Missing ⚠️
iceoryx2-bb/system-types/src/file_name.rs 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1118      +/-   ##
==========================================
- Coverage   77.33%   77.27%   -0.07%     
==========================================
  Files         362      364       +2     
  Lines       38954    39045      +91     
  Branches      346      346              
==========================================
+ Hits        30125    30171      +46     
- Misses       8185     8230      +45     
  Partials      644      644              
Flag Coverage Δ
Rust 77.27% <56.25%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ryx2-bb/container/src/string/polymorphic_string.rs 67.96% <ø> (ø)
iceoryx2-bb/container/src/string/static_string.rs 85.14% <ø> (ø)
iceoryx2-bb/container/src/string/utils.rs 100.00% <ø> (ø)
iceoryx2-bb/container/src/vector/mod.rs 98.29% <ø> (ø)
...ceoryx2-bb/container/src/vector/polymorphic_vec.rs 83.78% <ø> (ø)
...ceoryx2-bb/container/src/vector/relocatable_vec.rs 80.20% <ø> (ø)
iceoryx2-bb/container/src/vector/static_vec.rs 82.63% <ø> (ø)
iceoryx2-bb/derive-macros/src/lib.rs 0.00% <ø> (ø)
iceoryx2-bb/elementary/src/math.rs 52.94% <ø> (ø)
iceoryx2-bb/elementary/src/package_version.rs 70.00% <ø> (ø)
... and 97 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@orecham orecham force-pushed the iox2-865-support-nostd-builds branch 3 times, most recently from 02c47c3 to 4d16d9a Compare October 16, 2025 23:52
@orecham orecham changed the title [WIP] [WIP] Use core and alloc in Rust code Oct 16, 2025
@orecham orecham force-pushed the iox2-865-support-nostd-builds branch from 4f02b10 to fd2b60c Compare October 17, 2025 00:01
}
true => std::eprint!(
"{}{:9} {} ",
"{}{} {} ",
Copy link
Contributor Author

@orecham orecham Oct 17, 2025

Choose a reason for hiding this comment

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

Removed this indentation so that logs with and without origin are aligned.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, what do you think about moving the origin at the second position, after the log message? Maybe not in this PR but just in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elBoberido @elfenpiff I will leave it to you guys to decide. Could you create an issue if it's decided that we want to make the change.

@orecham orecham changed the title [WIP] Use core and alloc in Rust code Use core and alloc in Rust code Oct 17, 2025
@orecham orecham changed the title Use core and alloc in Rust code [#865] Use core and alloc in Rust code Oct 17, 2025
@orecham orecham force-pushed the iox2-865-support-nostd-builds branch from fd2b60c to d05a2d4 Compare October 17, 2025 00:29
@orecham orecham force-pushed the iox2-865-support-nostd-builds branch from 910c14b to 47eb134 Compare October 22, 2025 04:42
@orecham
Copy link
Contributor Author

orecham commented Oct 22, 2025

@orecham I'm fine with option 2. I would adjust it a little bit, though.

  • config.rs

    • can you create an alias for info! at the top of the file, e.g. foo_println! and use the alias in the file
    • also, add a todo with the #1127
  • once.rs

    • can you move the implementation in a module and build it only for no_std
    • re-export the spin-based Once in the parent scope for no_std
    • re-export std::sync::Once for non no_std builds

With this, our current builds with std still behave the same and we can brainstorm whether we want to use the spin-based Once for all builds or if we want to have a dedicated implementation for each platform with platform specific OS calls

@elBoberido

I added a wrapper for println in iceoryx2-bb-log (will be moved later) which does nothing when std is not enabled. I also added a switch to use std::sync::Once when std is available in crates that use it.

@orecham orecham force-pushed the iox2-865-support-nostd-builds branch 2 times, most recently from 844c165 to c5bfa36 Compare October 22, 2025 05:36
@orecham orecham force-pushed the iox2-865-support-nostd-builds branch from c5bfa36 to 89a979f Compare October 22, 2025 08:16
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.

4 participants