-
Notifications
You must be signed in to change notification settings - Fork 8
refactor: Replace fluvio-wasm-timer
with wasmtimer
for wasm timer support
#307
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
Conversation
fluvio-wasm-timer
with wasmtimer
for wasm timer supportfluvio-wasm-timer
with wasmtimer
for wasm timer support
There was a problem hiding this 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 the timer support for WASM targets by replacing the deprecated fluvio-wasm-timer with wasmtimer and introducing new timer traits to abstract over platform‐specific timer implementations. Key changes include:
- Refactoring timer-related traits (Instant and Delay) and their implementations for both tokio and wasmtimer.
- Updating HeartBeat and IdleTimeout to work with the new generic timer abstraction.
- Adjusting dependency and workspace configurations across various Cargo.toml files to reflect the new timer library usage.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
fe2o3-amqp/src/util/mod.rs | Introduced new timer traits and generic IdleTimeout type; replaced fluvio-wasm-timer. |
fe2o3-amqp/src/transport/mod.rs | Simplified error propagation in idle timeout handling. |
fe2o3-amqp/src/connection/mod.rs | Removed redundant error transformation in frame sending. |
fe2o3-amqp/src/connection/heartbeat.rs | Reworked heartbeat interval handling with a new Interval trait and stream implementation. |
fe2o3-amqp/src/connection/builder.rs | Updated lifetime annotations. |
Various Cargo.toml files | Updated dependency versions and workspace configurations for consistency. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…/minghuaw/fe2o3-amqp into fix/remove-dep-fluvio-wasm-timer
tokio::time::Sleep
andtokio::time::Interval
(and thus their counterpart onwasm
targets) are used to implementHeartBeat
andIdleTimeout
. This was accomplished previously withfluvio-wasm-timer
for wasm targets, which however still usesparking_lot
version "0.11" (after 4 years) and thus is subject to RUSTSEC-2024-0384. This PR replacefluvio-wasm-timer
withwasmtimer
, which is actively maintained and usesparking_lot
version "0.12".Related issue: #306