Skip to content

Commit b6f2e4d

Browse files
committed
feat(library): Introduce WAMR
Introduce WAMR (Wasm Micro Runtime) native application for Unikraft. The version used is an older commit (pre-stable release): `bc762f`. Add required files: `Kraftfile`, `Makefile.uk` and `README.md`. The root filesystem (in `rootfs/`) provides the pre-built `main.wasm` file, passed to as the `cmd` in `Kraftfile`. Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
1 parent 8d5ee80 commit b6f2e4d

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

library/wamrbc762f/Kraftfile

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
spec: v0.6
2+
3+
name: wamr
4+
5+
rootfs: ./rootfs
6+
7+
cmd: ["/main.wasm"]
8+
9+
unikraft:
10+
version: stable
11+
kconfig:
12+
CONFIG_LIBRAMFS: 'y'
13+
CONFIG_LIBUK9P: 'y'
14+
CONFIG_LIBUKBUS: 'y'
15+
CONFIG_LIBUKCPIO: 'y'
16+
CONFIG_LIBUKDEBUG_ANSI_COLOR: 'y'
17+
CONFIG_LIBUKLIBPARAM: 'y'
18+
CONFIG_LIBVFSCORE_AUTOMOUNT_ROOTFS: 'y'
19+
CONFIG_LIBVFSCORE_FSTAB: 'y'
20+
CONFIG_LIBVFSCORE_ROOTFS_INITRD: 'y'
21+
22+
targets:
23+
- qemu/x86_64
24+
- qemu/arm64
25+
- fc/x86_64
26+
- fc/arm64
27+
28+
libraries:
29+
musl: stable
30+
lwip: stable
31+
wamr: stable

library/wamrbc762f/Makefile.uk

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$(eval $(call addlib,appmicropython))

library/wamrbc762f/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# WAMR (Wasm Micro Runtime) Image
2+
3+
This directory contains the definition for the `unikraft.org/wamr` image.
4+
5+
To run this image, [install Unikraft's companion command-line toolchain `kraft`](https://unikraft.org/docs/cli) and then you can run:
6+
7+
```
8+
kraft run unikraft.org/wamr:bc762f
9+
```
10+
11+
Once executed you will get a "Hello, World!" message and one regarding a memory address.
12+
13+
## See also
14+
15+
- [How to run unikernels locally in Unikraft's Documentation](https://unikraft.org/docs/cli/running).

library/wamrbc762f/rootfs/main.wasm

1.36 KB
Binary file not shown.

0 commit comments

Comments
 (0)