This repo contains research documents and PoC application showcasing the feasibility of using wasmer-java as a Host Wasm Runtime Environment. The research was conducted in accordance to the W3F foundation grant.
3 main documents were produced as result of the research:
Additionally 2 more documents were created:
- Scope & Estimation for Libp2p JVM Kademlia Implementation
- Scope & Estimation for Libp2p JVM Yamux Implementation
Prerequisites - Docker
You can check if you have docker installed by running docker -v
If you don't have docker you can download it from here
PoC consists of a couple of carefully tailored examples which would be called in the docker container and have their output saved in a text file in the container.
- install wasmer-java submodule -
git submodule update --init
- create the docker image -
docker build -t wasmer-java wasmer-java
- create and enter container -
sudo docker run -it wasmer-java bash
- view output file -
less /opt/wasmer-java/output.txt
The first example being run tests imports by loading a runtime requiring the following imports:
The second example manipulates memory through a pointer returned by the function invoked
Both of the examples as well as the wasm files can be found here.
Note that the runtime wasm file also has a wat variant and the hello_world wasm file was compiled from the rust file with the same name.