You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
THis is an example of a hyperlight-wasm application that runs a wasm component inside a hyperlight-sandbox that implements a calculator (similar to the component model example [here](https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/tutorial)).
4
+
5
+
The [calculator](./wit/calculator.wit) itself is comprised of three wasm components:
6
+
-`calculator` - the main component that implements the calculator interface (written in Rust)
7
+
-`adder` - a component that implements the addition operation (written in Rust)
8
+
-`subtractor` - a component that implements the subtraction operation (written in Javascript)
9
+
10
+
The [example](./example/) program loads the composed calculator/wasm component into a hyperlight-sandbox along with a wasm runtime and invokes functions as hyperlight-guest calls.
11
+
12
+
## Requirements
13
+
14
+
To build and run this example, you need the following tools installed on your system:
15
+
16
+
-[Rust toolchain](https://www.rust-lang.org/tools/install) including `x86_unknown-none` target
17
+
-https://www.rust-lang.org/tools/install
18
+
-[Node.js](https://nodejs.org/en/download) (to build the [subtractor](./components/subtractor/) wasm component)
0 commit comments