-
Notifications
You must be signed in to change notification settings - Fork 824
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
CLI: Big CLI cleanup + merge Edge CLI #4407
Merged
Merged
Conversation
This file contains 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
theduke
force-pushed
the
issue-4405-wasmer-api-and-edge-cli
branch
3 times, most recently
from
January 25, 2024 02:24
2acd2c8
to
0ff6cc9
Compare
syrusakbary
reviewed
Jan 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good. I'll approve once we create the two related issues in the Wasmer repo so we don't forget:
- Unify Backend API crate and registry crate
- EdgeConfig (ideally it will have full context that combines with the wasmer.toml/config)
This was referenced Jan 25, 2024
Provides bindings to the Wasmer GraphQL api.
Imported from a different repository. Renamed to "wasmer-backend-cli". This crate will hold all CLI commands that interact with the Wasmer backend.
* Use async_trait for AsyncCliCommand * add `type Output = XX` to allow commands to return an output * Update all implementations
Wasn't used anywhere, the module wasn't even included in lib.rs
Wasn't used anywhere.
To have the templates in a nested directory.
These have not been needed in years...
The CLI internals are an implementation detail and should not be exposed. The only remaining public export is a single function that runs the CLI.
They are the most important thing for many viewers
They are commented out because some only work on nightly Rust. un-comment and run `rustup run nightly cargo fmt` to apply
Rename module + type
Prevents a duplicate dependency on the object crate. NOTE: does not update to latest, since that would just create another duplicate dependency chain.
theduke
force-pushed
the
issue-4405-wasmer-api-and-edge-cli
branch
from
January 25, 2024 13:32
46e15c3
to
35ed4ea
Compare
@syrusakbary I added two followup issues. |
syrusakbary
approved these changes
Jan 25, 2024
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.
This PR cleans up the CLI and merges in both the
wasmer-api
(backend API bindings) crate and the thewasmer-edge-cli
create (Edge related commands).The diff is very large, reviewers should look at the individual commits.
There is a lot of cleanup, like re-structuring the modules, removing a bunch of
dead code, normalizing all the
use
imports to the standard format, ...My initial intention was to keep them separate, and it would potentially make
sense to factor out all commands that use the Wasmer Backend in the future, but
this was not feasible in this PR without prevent future required cleanups and
normalization, particular regarding the wasmer_registry crate.
NOTE:: This PR makes all the CLI internals private.
This is a breaking change, but the CLI internals are heavily idiomatic and should
not be exposed to external users.
We were already not really paying attention to potential breakage.
Still needs to be discussed if we can actually do this.
Closes #4405
Required followup work:
wasmer-registry
GraphQL API usage to thewasmer-api
crate : Cleanup: Move GraphQL interactions from wasmer-registry to wasmer-api #4408wasmer-registry
crate: Cleanup: wasmer-registry #4409