**aWsm** is an efficient WASM runtime built with the `silverfish` compiler. This is an active research effort with regular breaking changes and no guarantees of stability.
**aWsm** is an efficient WASM runtime built with the `silverfish` compiler. This is an active research effort with regular breaking changes and no guarantees of stability.
## Host Dependencies
## Host Dependencies
- Docker
- Docker
Additionally, if you want to execute the Awsm runtime on your host environment, you need libuv. A reason you might want to do this is to debug your serverless function, as GDB does not seem to run properly within a Docker container.
Additionally, if you want to execute the Awsm runtime on your host environment, you need libuv. A reason you might want to do this is to debug your serverless function, as GDB does not seem to run properly within a Docker container.
If on Debian, you can install libuv with the following:
If on Debian, you can install libuv with the following:
```bash
```bash
./devenv.sh install_libuv
./devenv.sh install_libuv
```
```
## Setting up the environment
## Setting up the environment
**Note: These steps require Docker. Make sure you've got it installed!**
**Note: These steps require Docker. Make sure you've got it installed!**
We provide a Docker build environment configured with the dependencies and toolchain needed to build the Awsm runtime and serverless functions.
We provide a Docker build environment configured with the dependencies and toolchain needed to build the Awsm runtime and serverless functions.
To setup this environment, run:
To setup this environment, run:
```bash
```bash
./devenv.sh setup
./devenv.sh setup
```
```
To enter the docker environment, run:
To enter the docker environment, run:
```
```bash
./devenv.sh run
./devenv.sh run
```
```
## To run applications
## To run applications
**From within the Docker container environment.**
### From within the Docker container environment
Run the following to copy the awsmrt binary to /awsm/runtime/bin.
Run the following to copy the awsmrt binary to /awsm/runtime/bin.
```
```bash
cd /awsm/runtime
cd /awsm/runtime
make clean all
make clean all
```
```
There are a set of benchmarking applications in the `/awsm/runtime/tests` directory. Run the following to compile all benchmarks runtime tests using silverfish and then copy all resulting `<application>_wasm.so` files to /awsm/runtime/bin.
There are a set of benchmarking applications in the `/awsm/runtime/tests` directory. Run the following to compile all benchmarks runtime tests using silverfish and then copy all resulting `<application>_wasm.so` files to /awsm/runtime/bin.
```
```bash
cd /awsm/runtime/tests/
cd /awsm/runtime/tests/
make clean all
make clean all
```
```
@ -47,15 +53,16 @@ make clean all
You've now built the binary and some tests. We will now execute these commands from the host
You've now built the binary and some tests. We will now execute these commands from the host
To exit the container:
To exit the container:
```
```bash
exit
exit
```
```
**From the host environment**
### From the host environment
You should be in the root project directory (not in the Docker container)
You should be in the root project directory (not in the Docker container)
```
```bash
cd runtime/bin/
cd runtime/bin/
```
```
@ -63,24 +70,25 @@ We can now run Awsm with one of the serverless functions we built. Let's run Fib
Because serverless functions are loaded by Aswsm as shared libraries, we want to add the `runtime/tests/` directory to LD_LIBRARY_PATH.
Because serverless functions are loaded by Aswsm as shared libraries, we want to add the `runtime/tests/` directory to LD_LIBRARY_PATH.