Skip to content

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

Merged
merged 17 commits into from
Apr 30, 2025

Conversation

minghuaw
Copy link
Owner

@minghuaw minghuaw commented Apr 30, 2025

tokio::time::Sleep and tokio::time::Interval (and thus their counterpart on wasm targets) are used to implement HeartBeat and IdleTimeout. This was accomplished previously with fluvio-wasm-timer for wasm targets, which however still uses parking_lot version "0.11" (after 4 years) and thus is subject to RUSTSEC-2024-0384. This PR replace fluvio-wasm-timer with wasmtimer, which is actively maintained and uses parking_lot version "0.12".

Related issue: #306

@minghuaw minghuaw changed the title fix: Replace fluvio-wasm-timer with wasmtimer for wasm timer support refactor: Replace fluvio-wasm-timer with wasmtimer for wasm timer support Apr 30, 2025
@minghuaw minghuaw requested a review from Copilot April 30, 2025 08:48
Copy link
Contributor

@Copilot Copilot AI left a 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.

@minghuaw minghuaw merged commit 8d7525e into main Apr 30, 2025
3 checks passed
@minghuaw minghuaw deleted the fix/remove-dep-fluvio-wasm-timer branch April 30, 2025 17:50
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.

1 participant