• This repository has been archived on 31/Oct/2023
  • Stars
    star
    149
  • Rank 248,567 (Top 5 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WAsmcloud SHell - the comprehensive command-line tool for wasmCloud development

Latest Release Rust Build Rust Version Contributors Good first issues wash-cli

                                     _                 _    _____ _          _ _
                                ____| |               | |  / ____| |        | | |
 __      ____ _ ___ _ __ ___  / ____| | ___  _   _  __| | | (___ | |__   ___| | |
 \ \ /\ / / _` / __| '_ ` _ \| |    | |/ _ \| | | |/ _` |  \___ \| '_ \ / _ \ | |
  \ V  V / (_| \__ \ | | | | | |____| | (_) | |_| | (_| |  ____) | | | |  __/ | |
   \_/\_/ \__,_|___/_| |_| |_|\_____|_|\___/ \__,_|\__,_| |_____/|_| |_|\___|_|_|

Why wash

wash is a bundle of command line tools that, together, form a comprehensive CLI for wasmCloud development. Everything from generating new wasmCloud projects, managing cryptographic signing keys, and interacting with OCI compliant registries is contained within the subcommands of wash. Our goal with wash is to encapsulate our tools into a single binary to make developing WebAssembly with wasmCloud painless and simple.

Installing wash

Cargo

cargo install wash-cli

Linux (deb/rpm + apt)

# Debian / Ubuntu (deb)
curl -s https://packagecloud.io/install/repositories/wasmcloud/core/script.deb.sh | sudo bash
# Fedora (rpm)
curl -s https://packagecloud.io/install/repositories/wasmcloud/core/script.rpm.sh | sudo bash

sudo apt install wash

Linux (snap)

sudo snap install wash --edge --devmode

MacOS (brew)

brew tap wasmcloud/wasmcloud
brew install wash

Windows (choco)

choco install wash

Nix

nix run github:wasmCloud/wash

Using wash

wash has multiple subcommands, each specializing in one specific area of the wasmCloud development process.

build

Builds and signs the actor, provider, or interface as defined in a wasmcloud.toml file. Will look for configuration file in directory where command is being run.
There are three main sections of a wasmcloud.toml file: common config, language config, and type config.

Common Config

Setting Type Default Description
name string Name of the project
version string Semantic version of the project
path string {pwd} Path to the project directory to determine where built and signed artifacts are output
wasm_bin_name string "name" setting Expected name of the wasm module binary that will be generated
language enum [rust, tinygo] Language that actor or provider is written in
type enum [actor, provider, interface ] Type of wasmcloud artifact that is being generated

Language Config - [tinygo]

Setting Type Default Description
tinygo_path string which tinygo The path to the tinygo binary

Language Config - [rust]

Setting Type Default Description
cargo_path string which cargo The path to the cargo binary
target_path string ./target Path to cargo/rust's target directory

Type Config - [actor]

Setting Type Default Description
claims list [] The list of provider claims that this actor requires. eg. ["wasmcloud:httpserver", "wasmcloud:blobstore"]
registry string localhost:8080 The registry to push to. eg. "localhost:8080"
push_insecure boolean false Whether to push to the registry insecurely
key_directory string ~/.wash/keys The directory to store the private signing keys in
filename string <build_output>_s.wasm The filename of the signed wasm actor
wasm_target string wasm32-unknown-unknown Compile target
call_alias string The call alias of the actor

Type Config - [provider]

Setting Type Default Description
capability_id string The capability ID of the provider
vendor string The vendor name of the provider

Type Config - [interface]

Setting Type Default Description
html_target string ./html Directory to output HTML
codegen_config string . Path to codegen.toml file

Example

name = "echo"
language = "rust"
type = "actor"
version = "0.1.0"

[actor]
claims = ["wasmcloud:httpserver"]

[rust]
cargo_path = "/tmp/cargo"

call

Invoke a wasmCloud actor directly with a specified payload. This allows you to test actor handlers without the need to manage capabilities and link definitions for a rapid development feedback loop.

claims

Generate JWTs for actors, capability providers, accounts and operators. Sign actor modules with claims including capability IDs, expiration, and keys to verify identity. Inspect actor modules to view their claims.

completions

Generate shell completion files for Zsh, Bash, Fish, or PowerShell.

ctl

Interact directly with a wasmCloud control-interface, allowing you to imperatively schedule actors, providers and modify configurations of a wasmCloud host. Can be used to interact with local and remote control-interfaces.

ctx

Automatically connect to your previously launched wasmCloud lattice with a managed context or use contexts to administer remote wasmCloud lattices.

drain

Manage contents of the local wasmCloud cache. wasmCloud manages a local cache that will avoid redundant fetching of content when possible. drain allows you to manually clear that cache to ensure you're always pulling the latest versions of actors and providers that are hosted in remote OCI registries.

gen

Generate code from smithy files using weld codegen. This is the primary method of generating actor and capability provider code from .smithy interfaces. Currently has first class support for Rust actors and providers, along with autogenerated HTML documentation.

keys

Generate ed25519 keys for securely signing and identifying wasmCloud entities (actors, providers, hosts). Read more about our decision to use ed25519 keys in our ADR.

lint

Perform lint checks on .smithy models, outputting warnings for best practices with interfaces.

new

Create new wasmCloud projects from predefined templates. This command is a one-stop-shop for creating new actors, providers, and interfaces for all aspects of your application.

par

Create, modify and inspect provider archives, a TAR format that contains a signed JWT and OS/Architecture specific binaries for native capability providers.

reg

Push and Pull actors and capability providers to/from OCI compliant registries. Used extensively in our own CI/CD and in local development, where a local registry is used to store your development artifacts.

up

Bootstrap a wasmCloud environment in one easy command, supporting both launching NATS and wasmCloud in the background as well as an "interactive" mode for shorter lived hosts.

validate

Perform validation checks on .smithy models, ensuring that your interfaces are valid and usable for codegen and development.

Shell auto-complete

wash has support for autocomplete for Zsh, Bash, Fish, and PowerShell. See Completions for instructions for installing autocomplete for your shell.

Contributing to wash

If you have any feature suggestions, find any bugs, or otherwise have a question, please submit an issue here. Forking & submitting Pull Requests are welcome, and the good first issue label is a great way to find a place to start if you're looking to contribute.

Developer guide

For more information on getting started developing wash, see the developers guide.

More Repositories

1

wasmCloud

wasmCloud allows for simple, secure, distributed application development using WebAssembly components and capability providers.
Rust
1,329
star
2

wasmcloud-otp

wasmCloud host runtime that leverages Elixir/OTP and Rust to provide simple, secure, distributed application development using the actor model
Elixir
229
star
3

wascc-host

Library for hosting actors and capability providers in a host process
Rust
202
star
4

examples

ARCHIVED: This repository contains examples for pre-1.0 versions of wasmCloud. All examples are now located in the main wasmCloud repository https://github.com/wasmCloud/wasmCloud/tree/main/examples.
CSS
124
star
5

wadm

wasmCloud Application Deployment Manager (wadm): Declarative application deployments for wasmCloud applications.
Rust
96
star
6

capability-providers

ARCHIVED: wasmCloud pre-1.0 capability providers. See up-to-date capability providers in the main repository, https://github.com/wasmcloud/wasmcloud
Rust
79
star
7

wascap

Embed, extract, and validate capability claims in JWTs for WebAssembly modules
Rust
65
star
8

wasmcloud-js

wasmCloud JavaScript Host Runtime
TypeScript
42
star
9

nkeys

Rust implementation of the NATS nkeys library
Rust
38
star
10

interfaces

wasmCloud API interfaces: smithy IDLs and shared libraries
CSS
34
star
11

wascc-actor

Now deprecated in favor of using wapc-generated types and wrappers
Rust
33
star
12

kasmcloud

Running and managing Wasm(actors) and capability providers in Kubernetes
Rust
32
star
13

weld

tools for processing smithy models
CSS
18
star
14

wasmcloud-operator

Kubernetes operator for declaratively deploying wasmCloud applications (via wadm) and hosts on Kubernetes.
Rust
18
star
15

actor-interfaces

Libraries used by actors to interface with different capability providers
Rust
16
star
16

krustlet-wasmcloud-provider

Kubernetes Rust Kubelet provider for wasmCloud
Rust
15
star
17

project-templates

wasmCloud project templates - use with 'wash new'
HTML
14
star
18

provider-sdk-go

SDK for writing wasmCloud providers in Go.
Go
11
star
19

aws-lambda-wascc-runtime

AWS Lambda Runtime for Hosting waSCC Actors
Rust
10
star
20

wasmdome

Assembly Mechs: Beyond WasmDome - a game used to demonstrate waSCC features & use cases
Rust
9
star
21

wasmcloud.com

https://wasmCloud.com website, documentation, blog, and community meetings, built with Docusaurus.
MDX
9
star
22

wasm-air

Use case scenario exploration to build a "Flight Aware"-like distributed system
Rust
8
star
23

wasmcloud-dev-site

Documentation site for wasmCloud.dev
HTML
8
star
24

machine-learning

5
star
25

actor-tinygo

SDK for writing wasmCloud actors in TinyGo
Go
5
star
26

wasmcloud-k8s-operator

wasmCloud Kubernetes Operator
Go
4
star
27

wascc-actor-as

Build waSCC Actors in AssemblyScript
TypeScript
4
star
28

lattice-observer

A reusable Elixir library for monitoring a lattice and deriving observed state
Elixir
3
star
29

wasmcloud-component-adapters

Rust
2
star
30

homebrew-wasmcloud

Homebrew tap for wasmCloud
Ruby
2
star
31

provider-archive

Library for PAR files - compressable TARs for managing OS/CPU-native capability provider plugins and signed claims
Rust
2
star
32

new-provider-template

Cargo generate template for creating a new native capability provider
Rust
2
star
33

control-interface-client

API and rust interface library for interacting with the lattice control interface
Rust
2
star
34

models

2
star
35

adr

Journal of Architectural Decision Records made for the project
2
star
36

stack-trader

[DEPRECATED] - Very outdated technology demo in the form of a game illustrating the use of waSCC and a cloud-based ECS
JavaScript
2
star
37

.github

1
star
38

wasmfrontiers-site

Website for wasmfrontiers.com
HTML
1
star
39

branding

wasmCloud logos
1
star
40

community-meetings

Notes for community calls are now handled in https://github.com/wasmcloud/wasmcloud.com-dev
1
star
41

amazon-sqs-messaging-provider

An Amazon SQS capability provider that implements the wascc:messaging protocol
Rust
1
star
42

tutorials

Shell
1
star
43

wasmcloud-test

test-related tools, utilities, and libraries
Rust
1
star
44

wasmcloud-messaging

Repository for the wasmcloud-messaging WebAssembly component model interface
1
star
45

frontiers

wasmCloud Frontiers
Elixir
1
star
46

wasmCloud-contrib

Community contributions of providers, components, and demos
1
star
47

common-actions

Common GitHub actions for use across wasmCloud repositories
1
star
48

wasmdome-web

Experimental web UI for the Assembly Mechs: Beyond WasmDome game demonstration
HTML
1
star