Revert "Implement wasmer init and wasmer publish"

This commit is contained in:
Syrus Akbary
2022-12-16 14:09:55 -08:00
committed by GitHub
parent 7a90abfcc6
commit 250ebff4e8
44 changed files with 54 additions and 3791 deletions

View File

@@ -11,7 +11,7 @@ use crate::commands::CreateObj;
#[cfg(feature = "wast")]
use crate::commands::Wast;
use crate::commands::{
Add, Cache, Config, Init, Inspect, List, Login, Publish, Run, SelfUpdate, Validate, Whoami,
Add, Cache, Config, Inspect, List, Login, Run, SelfUpdate, Validate, Whoami,
};
use crate::error::PrettyError;
use clap::{CommandFactory, ErrorKind, Parser};
@@ -46,10 +46,6 @@ enum WasmerCLIOptions {
/// Login into a wapm.io-like registry
Login(Login),
/// Login into a wapm.io-like registry
#[clap(name = "publish")]
Publish(Publish),
/// Wasmer cache
#[clap(subcommand)]
Cache(Cache),
@@ -139,10 +135,6 @@ enum WasmerCLIOptions {
/// Inspect a WebAssembly file
Inspect(Inspect),
/// Initializes a new wapm.toml file
#[clap(name = "init")]
Init(Init),
/// Run spec testsuite
#[cfg(feature = "wast")]
Wast(Wast),
@@ -173,10 +165,8 @@ impl WasmerCLIOptions {
Self::CreateObj(create_obj) => create_obj.execute(),
Self::Config(config) => config.execute(),
Self::Inspect(inspect) => inspect.execute(),
Self::Init(init) => init.execute(),
Self::List(list) => list.execute(),
Self::Login(login) => login.execute(),
Self::Publish(publish) => publish.execute(),
#[cfg(feature = "wast")]
Self::Wast(wast) => wast.execute(),
#[cfg(target_os = "linux")]
@@ -234,9 +224,10 @@ fn wasmer_main_inner() -> Result<(), anyhow::Error> {
WasmerCLIOptions::Run(Run::from_binfmt_args())
} else {
match command.unwrap_or(&"".to_string()).as_ref() {
"add" | "cache" | "compile" | "config" | "create-exe" | "help" | "inspect" | "init"
| "run" | "self-update" | "validate" | "wast" | "binfmt" | "list" | "login"
| "publish" => WasmerCLIOptions::parse(),
"add" | "cache" | "compile" | "config" | "create-exe" | "help" | "inspect" | "run"
| "self-update" | "validate" | "wast" | "binfmt" | "list" | "login" => {
WasmerCLIOptions::parse()
}
_ => {
WasmerCLIOptions::try_parse_from(args.iter()).unwrap_or_else(|e| {
match e.kind() {