WebAssembly is a very promising new technology that has received a lot of attention from Microsoft’s cloud native computing team on both its subsidiaries Deis Labs and Azure. With the rapid emergence of new WebAssembly tools, all you need is an environment where you can try them out.
That’s why Deis Labs released New Hippo Web Assembly platform It’s very important. Built like many Deis tools for scratching your own itching, it quickly installs WebAssembly (WASM) code, whether hosted in a browser or a standalone WebAssembly System Interface (WASI). How to manage and execute. The built-in channel can be used in combination with a Git server to create and deploy different releases in one environment, requiring only one Hippo server to separate production, staging, and development builds. ..
You can host multiple applications on Hippo. WebAssembly means sandboxed by default and requires explicit permissions to access the host system or external devices. The code is also portable. Once compiled for WebAssembly, it can run on any WebAssembly system on Windows, Linux, macOS, Intel, RISC-V, or ARM. Hippo provides a way to build once, test once, and run code everywhere.
Hippo setup on development PC
Tools like Hippo are ideal for cloud-native operations, but current developer releases have only been tested on desktop systems. I decided to give it a try on a Windows PC running a recent build of WSL2 hosting Ubuntu. Deis provides steps for running Hippo locally,details of macOS and Linux systems..
There were some issues setting the prerequisites for running Hippo on a WSL2 Ubuntu 20.04 LTS system.First, I had to Install WAGI, the WebAssembly application gateway interface.. It’s easy to install by including one binary in the downloadable tarfile hosted on the GitHub repository. I downloaded it, unzipped it, moved it to the user’s binary directory, and it was easy to do. I had the opportunity to install Rust as it may be needed if any of the Deis tools need to be recompiled.
This procedure was probably the most difficult on WSL2 because it required a copy of the toolkit that was essential to the build. Ubuntu 20.04 doesn’t have the right set of dependencies for this, so I needed an alternative package installer that could downgrade a particular key library to the right version. Stack Overflow answer showed me suitability, An alternative to apt, which allows you to choose the appropriate dependencies for your installation and replace the two low-level C libraries. I used the setup script to install the build essentials and prepare Rust.
What is Bindle?
Main reason Installing Rust as part of the Hippo installation is for Bindle, Deis’s WebAssembly package tool. Bindle is described as an “aggregate object storage” system. The metaphor used in the document is “Bindle is a digital silverware drawer.” We may all have several different objects in the silverware drawer, but we all use drawers to sort and store the silverware. Bindle does much the same for the artifacts that make up a modern application, and to some extent understands how an application is configured based on how and where it is used.
You can create sparse installations on resource-constrained edge hosts (such as Raspberry Pi) and create Bindle descriptions for your application that contain the elements needed for a powerful server in the heart of the public cloud. The application host’s Bindle client can get the elements and dependencies and deploy them properly. The result is an application-centric deployment model that avoids multiple builds using repositories and smart descriptions and delivers the right code to the right environment.
After installing Bindle, you can run Bindle using the defaults and set up a local Bindle server for Hippo to use. Next, I installed node.js. Use WSL instructions provided by Microsoft.. This required using curl to download nvm and run it to install both the latest and long-term supported versions of the node. Do not use Ubuntu procedures to install the node. I install using snaps, but WSL2 does not fully support snaps.
You must install Rust’s wasm32-wasi support for your hippo-hosted Rust Web Assembly application and yo-wasm Yeoman application scaffolding tool. This allows you to compile your Rust code into a WASI target and run it inside Hippo.
I’m done now because they are in place Install .NET 5Before installing both the .NET 5 SDK and the runtime, first set up support for Microsoft’s Debian package repository.you have a Two options for .NET runtime: One supports ASP.NET Core, the other does not. Hippo is a model-view-controller web application, so you need to use the ASP.NET version of the runtime.
Build and run a hippopotamus
Once all the prerequisites are installed, you can build Hippo. First, duplicate the HippoGitHub repository to a local directory on your WSL system. Once installed, you can build and run your app and add the BINDLE_URL environment variable to specify your local Bindle server. We recommend that you install the Hippo CLI at this point as it is required for application development and deployment.
Now you can connect to the Hippo server and test it working. Located on the localhost on port 5001. If you are running a recent build of WSL2, you should be able to connect from your Windows desktop browser using your local host, as Microsoft eventually fixed one of WSL 2’s many years. Network problem. Proxy virtual machine network through Windows, preserving its own IP address and virtual network switch. You no longer need a script to extract and share network addresses.
You must register an account before you can connect to the server. Since it runs locally, you are free to choose your account details. Make sure it’s something you can remember, as you’ll need more details to create your first app. After creating an account, log in.[新しいアプリケーションの作成]The button was displayed[アプリ]The page is displayed.
Create your first Hippo Web Assembly app
You can create an app for Hippo from the web UI, For now, it’s easier to use the command line..Make sure you have Installed Hippo CLI, Because Yeoman uses it to build a scaffolding for the application. Before you start, set the Hippo account and password, and the environment variables for that endpoint. Yes, this is not a good security practice, but here we are building and running test code on a separate PC using software that is not yet production-ready.
To build a basic helloworld application, use the yo-wasm tool to build a WebAssemblyRust application. After entering the appropriate values according to the script, the source code will be built and loaded into the Hippo server. Then use the Rust Cargo Tool to compile and test your WASI application. When run on the command line, you can use Hippo’s CLI tools to push it to the Bindle and view it within Hippo. Open the project, select the development environment for your build, and click the link to run the code.
There are many things I like about hippos. If there’s one thing that WebAssembly lacks, it’s an effective playground like Heroku. The hippopotamus may not be that playground yet, but it’s certainly something you can use now as part of your own development workflow, even in the early stages. Being able to run on a development PC is an additional benefit, as you don’t have to rely on third-party systems. It’s less impactful enough to run as part of a WSL 2 environment, so you can use tools like Visual Studio Code to work with remote development capabilities to edit WSL Rust code from Windows.
If you’re interested in WebAssembly, Hippo may be the tool you need to get started. This simplifies the operation of WebAssembly code and provides many of the many elements needed to carry out development in one place. It’s still clearly an early release, but it has enough to get you started, making it an indispensable tool for anyone using WebAssembly.
Copyright © 2021 IDG Communications, Inc.