Jump into WebAssembly with Hippo

WebAssembly is an extremely promising new technology that’s getting a lot of interest from Microsoft’s cloud-native computing teams, both in its Deis Labs subsidiary and in Azure. With new WebAssembly tools arriving rapidly, what’s needed is an environment where you can try them out.

That’s why Deis Labs’ release of its new Hippo WebAssembly platform is so important. Built like many of Deis’ tools to scratch its own itch, it’s a way of quickly installing, managing, and running WebAssembly (WASM) code, whether it’s browser hosted or stand-alone WebAssembly System Interface (WASI). Using its built-in channels in conjunction with a Git server, you can make and deploy different releases in one environment, keeping production, staging, and development builds separate while still only needing one Hippo server.

You can host multiple applications in Hippo. WebAssembly means they’re sandboxed by default, requiring explicit permissions to access the host system or external devices. Your code is also portable. Once compiled for WebAssembly, it’ll run on any WebAssembly system, whether Windows, Linux, or macOS, or whether Intel, RISC-V, or ARM. Hippo gives you a way to build once, test once, and run your code anywhere.

Setting up Hippo on a development PC

Although tools like Hippo would be ideal for cloud-native operations, the current developer release has only been tested on desktop systems. I decided to try it out on a Windows PC running a recent build of WSL2, hosting Ubuntu. Deis provides instructions for running Hippo locally, with details for macOS and Linux systems.

There were some issues getting the prerequisites in place to run Hippo on a WSL2 Ubuntu 20.04 LTS system. First, I needed to install WAGI, the WebAssembly Application Gateway Interface. This installs easily enough, with a single binary in the downloadable tarfile hosted in its GitHub repo. Once download, unpacked, and moved to a user binary directory, it ran easily. I took the opportunity to install Rust, as I might need it if I had to recompile any of the Deis tools.

This step was perhaps the most difficult on WSL2, as it required a copy of the build-essential toolkit. Ubuntu 20.04 doesn’t have the right set of dependencies for this, so I needed an alternative package installer that would allow me to downgrade certain key libraries to the appropriate versions. A Stack Overflow answer pointed me to aptitude, an alternative to apt that allows you to choose appropriate dependencies for an install and allow it to replace two low-level C libraries. I finally got build-essential installed, ready for Rust, using its setup scripts.

Copyright © 2021 IDG Communications, Inc.

Source link