Skip to content

Conversation

@deltronix
Copy link

@deltronix deltronix commented Dec 30, 2025

Removed dependency on std when the "std" feature is disabled

The library can now be compiled with the --no-default-features flag to enable no_std support. The target will have to specify a #[global_allocator] such as
embedded-alloc

Replace socket2::SockAddr dependency with core::net::SocketAddrV4/6

pub fn universe_to_ipv4_multicast_addr() now returns core::net::SocketAddrV4

pub fn universe_to_ipv6_multicast_addr() now returns core::net::SocketAddrV6

Implements the foundation for #42

Removed dependency on std when the "std" feature is disabled

The library can now be compiled with the --no-default-features flag to
enable no_std support. The target will have to specify a
#[global_allocator] such as
[embedded-alloc](https://docs.rs/embedded-alloc/latest/embedded_alloc/)

Replace socket2::SockAddr dependency with core::net::SocketAddrV4/6

`pub fn universe_to_ipv4_multicast_addr()` now returns
core::net::SocketAddrV4

`pub fn universe_to_ipv6_multicast_addr()` now returns
core::net::SocketAddrV6
@bruingineer
Copy link
Contributor

Please update from main

use super::*;
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6};
use core::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6};
use socket2::SockAddr;
Copy link
Contributor

Choose a reason for hiding this comment

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

the tests should be adjusted to remove the socket2 dependency. Once that is gone, then the tests are also no_std.

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