Skip to content
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

Use async rust extensions #886

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jprendes
Copy link
Collaborator

No description provided.

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>

Choose a reason for hiding this comment

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

PR Overview

This pull request refactors a large portion of the codebase to use asynchronous Rust extensions. Key changes include converting many functions (in instances, tasks, and tests) to asynchronous equivalents, updating dependency declarations to include Tokio from the workspace, and modifying event‐sending traits to return and work with futures.

Reviewed Changes

File Description
crates/containerd-shim-wasm/src/sandbox/cli.rs Converted several Shim methods (e.g. new, start_shim, wait) to async functions with updated await semantics.
crates/containerd-shim-wasm/src/sandbox/shim/events.rs Changed the EventSender trait from a synchronous send method to an async function returning a future.
crates/containerd-shim-wasm/src/sandbox/shim/local/tests.rs Updated tests to use Tokio’s async channels and task spawning ensuring proper awaits throughout the test lifecycle.
crates/containerd-shim-wasm/src/sandbox/instance_data.rs Replaced std::sync::RwLock with tokio::sync::RwLock and adjusted all lock acquisitions to be awaited.
Various Cargo.toml files (wasmedge, wamr) Added Tokio as a dependency from the workspace to ensure consistent async runtime support.

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use containerd-shim's async API
1 participant