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

GHCI/MigTD - Current Migration TD does not support multiple TDs migration #7

Open
5 tasks done
gaojiaqi7 opened this issue Jun 21, 2023 · 5 comments
Open
5 tasks done
Assignees

Comments

@gaojiaqi7
Copy link
Contributor

gaojiaqi7 commented Jun 21, 2023

Tasks:

  • Upgrade rustls
  • Async rustls
  • Non-blocking device read/write operations, i.e. implementing AsyncRead and AsyncWrite defined in futures-io for VsockStream and VirtioSerialPort
  • Non-blocking TDVMCALL
  • Async runtime
@gaojiaqi7
Copy link
Contributor Author

After some investigation, I found that async/await is a good choice for the single threaded execution environment.

Rust does not provide an official implementation of Future runtime, so we need to realize an executor to run our asynchronous tasks. We also need to make some changes on the blocking functions such as TLS, vsock/serial and GHCI to support the async.

  • Implements a future runtime which can support multiple tasks, timeout, external events and idle. We can take third-party crates as reference: https://github.com/embassy-rs/embassy.git
  • Implements the async rustls (or use async-rustls crate if possible) and add async I/O methods in std-support crate. Reference: https://github.com/smol-rs/async-rustls.git
  • Supports non-blocking sending and receiving in device drivers (vsock/serial/vmcall)
  • Add Future implementation for GHCI interfaces such as wait_for_request.

@jyao1
Copy link
Contributor

jyao1 commented Jul 31, 2023

Please describe why we need embassy.

@gaojiaqi7
Copy link
Contributor Author

gaojiaqi7 commented Aug 8, 2023

Some async runtime projects from community:

Crate no_std compatible Complete runtime cycle Usage and activity
tokio No Yes 21.5k stars, active in 1 day
async-std No Yes 3.7k stars, active in 3 months
smol No Yes 2.9k stars, active in 1 month
Executor Yes No 212 stars, active in 1 year
Embassy Yes No (Only for Arm and Riscv embedded, no x86 impl) 21.5k stars, active in 1 day
rust/future-rs Partial (futures-executor and futures-io need std) ? 4.9k stars, active in 3 days

@gaojiaqi7
Copy link
Contributor Author

gaojiaqi7 commented Aug 14, 2023

Async rustls crates from community:

Async rustls crate Async IO Crate Community Usage and activity
tokio-rustls tokio::io rustls 12 stars, 1 week
async-rustls futures::io smol-rs 32 stars, 1 week

@gaojiaqi7
Copy link
Contributor Author

gaojiaqi7 commented Aug 14, 2023

Async IO crates:

Async IO crate std-dependency Community Usage and activity
tokio-io Yes tokio-rs 21.6k stars, 1 day
futures-io Yes rust-lang 4.9k stars, 1 week

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

No branches or pull requests

2 participants