refactor(cli): remove manual tokio runtime #653
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Refactor – code structure improvement; removes the need for manually creating a Tokio runtime.
What is the current behavior?
The CLI currently requires a manually created tokio::runtime::Builder and LocalSet to execute async code.
This is noted in the code with a TODO comment
cli/src/main.rs:// TODO: Tokio runtime shouldn't be needed here (Address later)What is the new behavior?
The main function now uses #[tokio::main], so async CLI code runs within the runtime automatically.
Manual runtime creation and LocalSet are no longer needed, simplifying the code and reducing overhead.
Additional context
This change is purely structural; no functional behavior of the CLI has been altered.
It prepares the codebase for easier future async improvements and removes a known workaround.