Refactor facade to UI to go through a single trait#241
Merged
Conversation
it's orcin time
time to get assimilated!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR creates an Orchestrator trait, a facade that all UI implementations are expected to go through from now on.
The Orchestrator handles everything non-UI related and exposes convenient methods for UI implementations to bind against:
This also refactors some of the simple and fancy TUIs' logic to use the Orchestrator.
Although we do intend to make our UIs sync later, probably including egui, all methods on the Orchestrator are async. The idea is that async is the environment for scheduling, and sync as the environment for rendering, so the UI implementations should bridge between sync and async by spawning bridge workers on the async runtime that communicate with the UI threads.
@sermuns: I'd appreciate your feedback on the Orchestrator API (in
src/orchestrator/mod.rs), since you're currently implementing the UI in #240. Does it seem like a reasonable API, and is there anything else you'd think would be good to expose?What's missing
Type of change
--helpoutputscripts/regenerate_readme.pyfrom the root directory to ensure it has the latest sample outputTest plan
Ran inside the devvm, as sudo and non-sudo, and ensured that escalation doesn't fail and that disks still get written