Skip to content

Commit

Permalink
Initial wash up commit with command parsing (#25)
Browse files Browse the repository at this point in the history
* Initial commit with much commented out tui code, REPL can interpret commands

* initial commit of split terminal

Initial commit of working logger toggle

Cleaned up dependencies and comments

* Information logs on command parse, less noisy logs

version bump

* remove extra crate

* Structopt improvements, rudimentary host functionality

* rename wascc-host to wasmcloud-host
  • Loading branch information
brooksmtownsend authored Dec 7, 2020
1 parent a57e56d commit eb3877a
Show file tree
Hide file tree
Showing 3 changed files with 418 additions and 3 deletions.
13 changes: 11 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "wash-cli"
version = "0.1.8"
version = "0.1.10"
authors = ["Brooks Townsend <[email protected]>"]
edition = "2018"
repository = "https://github.com/wascc/wash"
description = "waSCC Shell (wash) CLI tool"
license = "Apache-2.0"
readme = "README.md"
keywords = ["webassembly", "wascc", "wash"]
keywords = ["webassembly", "wasmcloud", "wash"]
categories = ["wasm", "command-line-utilities"]

[badges]
Expand All @@ -19,15 +19,24 @@ env_logger = "0.7.1"
serde_json = "1.0.59"
serde = { version = "1.0.117", features = ["derive"] }
crossbeam = "0.7.3"
tui-logger = { version = "0.4.8", default-features = false, features = ["tui-crossterm"] }
tui = { version = "0.12.0", default-features = false, features = ["crossterm"] }
log = "0.4.11"
crossterm = "0.18.2"
unicode-width = "0.1.8"
tokio = { version = "0.2.0" }
nats = "0.8.5"
spinners = "1.2.0"

nkeys = "0.0.11"
latticeclient = "0.4.0"
wascap = "0.5.1"
term-table = "1.3.0"
provider-archive = "0.3.0"
once_cell = "1.5.2"
oci-distribution = { git = "https://github.com/brooksmtownsend/krustlet", branch = "oci-push" }
wasmcloud-host = { git = "https://github.com/wasmcloud/wasmcloud", branch = "main" }


[[bin]]
name = "wash"
Expand Down
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ mod par;
use par::ParCli;
mod reg;
use reg::RegCli;
mod up;
use up::UpCli;

/// This renders appropriately with escape characters
const ASCII: &str = "
Expand Down Expand Up @@ -49,18 +51,22 @@ enum CliCommand {
/// Utilities for interacting with OCI compliant registries
#[structopt(name = "reg")]
Reg(RegCli),
/// Utility to launch waSCC REPL environment
#[structopt(name = "up")]
Up(UpCli),
}

fn main() {
let cli = Cli::from_args();
env_logger::init();
// env_logger::init();

let res = match cli.command {
CliCommand::Keys(keyscli) => keys::handle_command(keyscli),
CliCommand::Lattice(latticecli) => lattice::handle_command(latticecli),
CliCommand::Claims(claimscli) => claims::handle_command(claimscli),
CliCommand::Par(parcli) => par::handle_command(parcli),
CliCommand::Reg(regcli) => reg::handle_command(regcli),
CliCommand::Up(upcli) => up::handle_command(upcli),
};

match res {
Expand Down
Loading

0 comments on commit eb3877a

Please sign in to comment.