Getting Started with wasmCloud – InApps Technology is an article under the topic Software Development Many of you are most interested in today !! Today, let’s learn Getting Started with wasmCloud – InApps Technology in today’s post !

Read more about Getting Started with wasmCloud – InApps Technology at Wikipedia

You can find content about Getting Started with wasmCloud – InApps Technology from the Wikipedia website

WasmCloud is a platform that aims to help developers create secure, portable, and reusable components (called actors). It leverages WebAssembly for extreme portability so you can secure, deploy, maintain, observe, and upgrade software, all while reducing the amount of boilerplate that must be copied and pasted.

WasmCloud was designed, from the ground up, around these five core ideas:

  • Productivity
  • Enterprise-grade security
  • Cost-effectiveness
  • Portability
  • Performance

If you’re just now hearing about WebAssembly, make sure to first read the following pieces: What Is WebAssembly and Why Do You Need It?, Build a WebAssembly App with Rust, and How to Compile C code into WebAssembly with Emscripten.

To finish up out series on WebAssembly, we’re going to walk through the first steps of using wasmCloud.

I’ll be demonstrating on Ubuntu Server 20.01, but you should be able to follow along with any Debian-based distribution, any Linux distribution that supports snap, Fedora, or macOS (but not M1 macs).

With that said, let’s get to the installation.

Installing Rust

Before we install wasmCloud, let’s first install Rust. It’s not an absolute dependency, but it is recommended. Log into your Linux server, open a terminal window, and install Rust with the command:

curl --proto '=https' --tlsv1.2 -sSf | sh

When prompted, type 1 for Proceed with installation (default) and hit Enter on your keyboard. The installation of Rust should complete without any errors. When the installation is finished, you’ll then need to source the environment variables for Rust with the command:

Read More:   What JavaScript Programmers Need to Know about Transpilers – InApps 2022

source $HOME/.cargo/env

At that point, Rust is installed and ready to go.

Installing wasmCloud

Now we can install wasmCloud. The first thing to be done is to add the necessary repository for the software. To do that, go back to your terminal window and issue the command:

curl -s | sudo bash

That command should also update apt for you. If it doesn’t, you can do it manually with the command:

sudo apt-get update

Once apt has been successfully updated, install the necessary wasmCloud software with the command:

sudo apt-get install wasmcloud wash -y

Getting Started with wasmCloud

With wasmCloud installed, you’re ready to fire up your first wasmCloud host. Do this with the command:

wash up

Your terminal will be split into four panes (Figure 1).

Figure 1: The wasmCloud instance has been brought up and is ready to be used.

This is a preconfigured wasmCloud host. Your terminal window should be sized to a minimum of 250×50 characters, otherwise, you’ll have to deal with line wrap, which will make everything a bit confusing. It’s also important, as you deploy your actors and providers, that you make note of the IDs of each (found in the bottom right pane) as they deploy. Retrieving those IDs after the fact can be challenging, as they will be truncated.

To view the running hosts, issue the command:

ctl get hosts

The output of the command should list a single host ID and the uptime (in seconds) for that host. To get a list of the inventory of a host, issue the command:

ctl get inventory ID

Where ID is the host ID.

The next thing we’re going to do is run our first actor. WasmCloud has provided a handy Echo sample actor (which merely echos input) to use, which can be started with the command:

ctl start actor

Once you’ve started the actor, you should see the progress in the top-right pane, which will state Actor starting on host ID (where ID is the ID of the host). The Echo actor only includes a single operator, which is to respond to delivered HTTP requests and will echo the request sent. But in order for this to work, we have to start the HTTP Server provider with the command:

Read More:   Has the Time Finally Come for Generics in Golang? – InApps 2022

ctl start provider

Now, let’s view the host inventory again with the command:

ctl get inventory ID

Where ID is the host ID.

This time you should see both the Echo actor and the HTTP provider included (Figure 2).

Figure 2: Our Echo actor and HTTP provider are now running on the host.

Now that we have both the actor and provider started, we have to connect them so they can function properly. For this, you’ll need the Actor ID and Provider ID (which you should have copied down as each was deployed).

To connect these two together, the command will be:

ctl link ACTORID PROVIDERID wasmcloud:httpserver PORT=8080

Where ACTORID is the ID of the Echo actor and PROVIDERID is the ID of the HTTP provider.

You should see something like:

Advertised link (MBCF) <-> (VAG3) successfully

Let’s interact with our newly-linked actor. Open a second terminal to your hosting server and issue the command:

curl localhost:8080/echo

You should see returned:

That’s a successful call to your linked actor and provider.

To exit out of the wasmCloud console, just type exit and you’re out. Just remember, once you exit, your actors and providers will no longer be available (so you’ll have to deploy them again if you want to use them).

Congratulations, you’ve taken your first steps with wasmCloud. To learn more about this powerful tool, check out the wasmCloud App Development documentation.


List of Keywords users find our article on Google:

oracle hospitality documentation
rs components vietnam
hire designers
hosting wikipedia
hire debian developers
rust server hosting
wrap terminal rust
getting started in rust
frame io wikipedia
proto io templates
rust based terminal
rust absolute value
wild wawa
rust curl
absolute vision technologies
rust command line
ctl internet packages
rust operator
ctl function
hire proto io designer
oracle http server
rust cargo install
apartment leasing in ho chi minh
rust server ubuntu
curl wikipedia
Rate this post

Let’s create the next big thing together!

Coming together is a beginning. Keeping together is progress. Working together is success.

Let’s talk

Get a custom Proposal

Please fill in your information and your need to get a suitable solution.

    You need to enter your email to download

      Success. Downloading...