**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 serverless runtime built with the `silverfish` compiler. It combines WebAssembly sandboxing with asynchronous I/O to provide a lightweight serverless solution suitable for edge computing.
## Host Dependencies
- 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.
@ -96,75 +95,27 @@ Notice that it is configured to run on port 10000. The `name` field is also used
Our fibonacci function expects an HTTP POST body of type "text/plain" which it can parse as an integer to figure out which Fibonacci number we want.
Let's get the 10th. Note that I'm using ApacheBench to make this request.
Let's get the 10th. Note that I'm using [HTTPie](https://httpie.org/) to send a POST request with a body containing the parameter I want to pass to my serverless function.
Note: You possibly run the awsmrt command in the foreground. If so, you should open a new terminal session.
```bash
echo 10 >fib.txt
ab -c 1 -n 1 -p fib.txt -v 2 http://localhost:10000/fibonacci
echo "10" | http :10000
```
In my case, I received the following in response. The response is 55, which seems to be correct!
```bash
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)...INFO: POST header ==
---
POST /fibonacci HTTP/1.0
Content-length: 3
Content-type: text/plain
Host: localhost:10000
User-Agent: ApacheBench/2.3
Accept: */*
---
LOG: header received:
HTTP/1.1 200 OK
Content-type: text/plain
Content-length: 3
Content-length: 3
Content-type: text/plain
55
..done
Server Software:
Server Hostname: localhost
Server Port: 10000
Document Path: /fibonacci
Document Length: 3 bytes
Concurrency Level: 1
Time taken for tests: 0.001 seconds
Complete requests: 1
Failed requests: 0
Total transferred: 100 bytes
Total body sent: 141
HTML transferred: 3 bytes
Requests per second: 952.38 [#/sec] (mean)
Time per request: 1.050 [ms] (mean)
Time per request: 1.050 [ms] (mean, across all concurrent requests)