feat: add the runtimes command to manage language runtimes #79
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.
After implementing the logic to retrieve, parse and manage language runtimes and repositories (see #63), this PR introduces the interface for developers to use it. The new
runtimes
command (the name is still under discussion and we may change it before v1.0.0) includes the following subcommands:list
: reads a remote repository and shows the available language runtimes in a tableinstall
: install the desired runtime/s in the current project. Depending on the arguments provided, it will apply the following changes:<name> <version>
: load the remote repository and install the runtime locally. It will fetch the different files and edit the.wws.toml
file to reflect the new runtime.wws.toml
file and install the missing runtimes in the local projectcheck
: load the.wws.toml
file and checks if the required runtimes are installed locallyuninstall
: remove all the local files related to a runtime and edit the.wws.toml
file to remove that dependency.All these commands will use by default the WebAssembly Language Runtimes project as the target repository. The
index.toml
files will be deployed as a static site and they will live in that repository.If you want to use a different repository for listing and installing, you can set the
--repo-name
and--repo-url
flags or set theWWS_REPO_NAME
andWWS_REPO_URL
environment variables:After installing a runtime,
wws
stores all the metadata. Any other developer that installs the runtime will download the files from the right repository.Examples
It closes #68