Meet Vow & Vinoc
Image by Gerd Altmann

Meet Vow & Vinoc

Authors
The Vino Team

August 17, 2021

Happy Wednesday! We’re excited to release the first wave of Vino-related tooling, libraries, and documentation. This release carves out the section of the Vino platform that can stand on its own while we continue working on the runtime. It’s split into three major sections: binary tooling, language SDKs, and code generators.

Want to get started immediately? Download the latest release of the binaries at releases.vino.dev and head over to the getting started guide at docs.vino.dev/getting-started/.

Binary tools

Our new releases page is where we’ll distribute pre-compiled binaries and platform-specific packages going forward. Currently we support Apple (arm & x86_64), Windows (32bit & 64bit), and Linux (x86_64, i686, and 64-bit arm).

Meet vow

vow, the Vino WebAssembly executor, is a companion tool that runs and executes individual .wasm binaries.

vow serves two major functions. It executes both local files and remote OCI artifacts, and it can turn any Vino WebAssembly module into a GRPC microservice instantly.

vow is a small but dense package. It allows you to test ideas on the command line before wiring them up into a larger flow. vow started as embedded functionality within a vino host, but we loved how it felt to use these components directly on the command line. The command line is like a Vino schematic with a single branch. You can pipe together multiple invocations of vow to test simple flows without any configuration.

It was agonizing deciding how much to release. We are keeping the API surface area lean to see how people use these tools before expanding. To get you started with one idea: we commonly wrap components with small shell scripts like the one below. This is a quick wrapper to turn any published artifact into a command line utility instantly.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/bin/sh

REGISTRY=[your_registry]:5000
MODULE=${REGISTRY}/test/integration:latest
COMPONENT=validate

if [ $# -eq 0 ]; then
  # No arguments passed, run without input
  vow run $MODULE $COMPONENT --latest
else
  # Script ran with arguments
  vow run $MODULE $COMPONENT --data=input="\"$1\"" --latest
fi

We want to turn cross-platform CLI scripting into core functionality. We have several experiments but we want to hear your ideas before we commit to anything. Feel free to open an issue here with your thoughts.

Welcome vinoc

vinoc is the Vino controller. It signs WebAssembly modules and speaks the Vino RPC protocol to invoke, query, and control Vino hosts & providers. Every part of Vino tracks statistics like the failure rate and execution duration for each component. vinoc is the tool to grab that data.

Take a look at the getting started guide to see how these tools play together.

Libraries and support tooling

We released seven libraries necessary to build WebAssembly components for vino. If you use the code generators (below) then you might not need to know these exist. They quietly do all the work you shouldn’t worry about.

Rust SDK

  • vino-codec - The Vino codec contains the methods to serialize and deserialize messages across the WebAssembly barrier and throughout a Vino runtime.
  • vino-entity - The Vino entity library encapsulates the entities that can exist on a Vino network and how to reference them. Entities like components, providers, hosts, clients, et al.
  • vino-macros - Macros used within the Vino codebase.
  • vino-packet - The Vino packet library defines the data structures that wrap component output. Packets are versioned messages that normalize output for a consumer like the Vino runtime.
  • vino-provider - The Vino provider library contains the port implementations and handlers for native Rust and WebAssembly components.
  • vino-transport - The Vino transport library contains the MessageTransport, wrapper, and stream definitions to normalize packets so they can be shipped around Vino networks.
  • vino-types - The Vino types crate contains shared types for the Vino codebase.

The source code for these is available in a monorepo at github.com/vinodotdev/vino-sdk.

Code generators

Yo Vino!

To get you booted up as quickly as possible, we have a Yeoman generator that automates the creation of Vino projects. Install it with npm install -g yeoman generator-vino and run it with yo vino. See more at Step 3: Creating a new project.

vino-codegen

We use WIDL extensively and code generators like vino-codegen to translate the schemas to code and documentation. As with the Rust SDK above, you shouldn’t need to use this directly. You just need to install it and let the yo vino generated project take over. The generated projects come with a Mac, Windows, and Linux compatible Makefile to automate as much as possible out of your way.

Next steps

The Vino runtime and host are still settling and will be included in a future release. The source code for vow and vinoc is gated behind open sourcing the runtime. Don’t fret, we’re working on getting it all into your hands ASAP! Sign up to be notified of upcoming releases on the vino.dev homepage.