Closed ogabrielides closed 1 week ago
The pull request introduces several changes primarily focused on enhancing the handling of ZeroMQ listeners in a cross-platform context. A new conditional dependency for the zmq
crate has been added to the Cargo.toml
file, targeting non-Windows operating systems. The AppState
struct in src/app.rs
has been modified to allow its listener fields to be None
on Windows. Additionally, the CoreZMQListener
struct's spawn_listener
method is now conditionally compiled for non-Windows systems, and the UI component's functionality is adjusted accordingly.
File | Change Summary |
---|---|
Cargo.toml | Added conditional dependency zmq = "0.10" for non-Windows OS under [target.'cfg(not(target_os = "windows"))'.dependencies] . Added zeromq = "0.4.1" for Windows. Added newline at end of file. |
src/app.rs | Changed mainnet_core_zmq_listener and testnet_core_zmq_listener fields from CoreZMQListener to Option<CoreZMQListener> . Updated initialization logic to conditionally create listeners. |
src/components/core_zmq_listener.rs | Added conditional compilation for spawn_listener method, separating implementations for Windows and non-Windows systems. Adjusted constants based on OS. |
src/ui/components/top_panel.rs | Wrapped add_connection_indicator call in add_top_panel function with a conditional compilation directive for non-Windows OS. |
Cargo.toml
regarding dependency management are related as both PRs modify the Cargo.toml
file, although they focus on different dependencies.Cargo.toml
and includes changes to src/app.rs
that enhance the handling of ZMQ listeners, which is directly related to the new zmq
dependency introduced in the main PR.🐰 In the code where I hop and play,
New listeners join the fray today!
With zmq's help, we leap and bound,
On Windows, some changes are found.
A flexible dance, across the land,
In every build, we take a stand! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Disables ZMQ connectivity detection functionality for Windows build
Under Windows the native
zeromq
is used whilezmq
is used for any other target os. For the moment, ZMQ connectivity detection feature is available only withzmq
.Tested with:
cargo build --target x86_64-pc-windows-gnu
successfully.Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor