Skip to content

heapless strings in service discovery to avoid doing too many hacks#100

Merged
jamesmunns merged 4 commits intomainfrom
alex/heapless_strings_in_service_discovery_to_avoid_hacks
Aug 24, 2025
Merged

heapless strings in service discovery to avoid doing too many hacks#100
jamesmunns merged 4 commits intomainfrom
alex/heapless_strings_in_service_discovery_to_avoid_hacks

Conversation

@cramt
Copy link
Copy Markdown
Collaborator

@cramt cramt commented Aug 23, 2025

currently using the git version of postcard due to needing heapless v0.9 support

@jamesmunns
Copy link
Copy Markdown
Owner

@cramt postcard-schema v0.2.5 released, and CI is sad :D

Comment thread crates/ergot/src/net_stack/services.rs Outdated
#[cfg(not(feature = "std"))]
let _ = topics
.clone()
.unicast_borrowed::<ErgotDeviceInfoTopic>(dest, info);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If the type is now owned (because it's a heapless string), you probably want to use unicast here not unicast_borrowed

Comment thread crates/ergot/src/net_stack/discovery.rs Outdated
///
/// Terminates when the timeout is reached
#[cfg(feature = "tokio-std")]
#[cfg(feature = "std")]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Using tokio-std here was intentional, we use tokio::time::timeout below.

@cramt
Copy link
Copy Markdown
Collaborator Author

cramt commented Aug 24, 2025

also ensured that all ergot tests pass in both std and nostd features

@cramt
Copy link
Copy Markdown
Collaborator Author

cramt commented Aug 24, 2025

the ci will be happy

@jamesmunns jamesmunns merged commit a08f68d into main Aug 24, 2025
4 checks passed
@jamesmunns jamesmunns deleted the alex/heapless_strings_in_service_discovery_to_avoid_hacks branch August 24, 2025 11:39
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