Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Add 'wasmtime: custom syscall' and 'wasmtime: UDP echo-server' demos #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

steveej
Copy link
Contributor

@steveej steveej commented Nov 11, 2019

Fixes #24.
Fixes #35.

@steveej steveej force-pushed the pr/wasmtime-custom-syscall branch 2 times, most recently from ea26806 to c735292 Compare November 11, 2019 14:52
@@ -0,0 +1,8 @@
# Wasmtime Custom Syscall Demo
This demo implements a WASM runtimem based on Wasmtime, provididng custom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtimem -> runtime
and
provididng -> providing

@steveej steveej force-pushed the pr/wasmtime-custom-syscall branch 2 times, most recently from 44ecb27 to 1574880 Compare November 13, 2019 16:45
@steveej steveej force-pushed the pr/wasmtime-custom-syscall branch 3 times, most recently from 7fa6c6a to 9401836 Compare November 13, 2019 22:10
@npmccallum
Copy link
Contributor

@steveej What is the status on this? I'd like to review when it is working.

@steveej steveej force-pushed the pr/wasmtime-custom-syscall branch 2 times, most recently from fcc9e1e to f534429 Compare November 14, 2019 22:28
@steveej
Copy link
Contributor Author

steveej commented Nov 14, 2019

@npmccallum

What is the status on this? I'd like to review when it is working.

The status of this PR is that I'm continuously adding more features to this, because the scope of this demo hasn't been limited.

Currently the demo will run a UDP echo-server on a hardcoded port. I'm working on extracting code to a common library and designing an experimental WASM module system.

This adds a demo which shows an implementation of a simple WASM syscall
module named _stdio_, containing a single syscall named _println_.

It demonstrates how the backend provides the syscall to the WASM guest,
and in turn how the guest calls into the syscalls.
@steveej steveej force-pushed the pr/wasmtime-custom-syscall branch 2 times, most recently from 013d3ee to b9a0e68 Compare November 26, 2019 11:06
@steveej steveej changed the title Add 'wasmtime: custom syscall' demo Add 'wasmtime: custom syscall' and 'wasmtime: UDP echo-server' demos Nov 26, 2019
@steveej steveej force-pushed the pr/wasmtime-custom-syscall branch from b9a0e68 to 7424c9e Compare November 26, 2019 11:11
This demo shows the extension of the previously introduced _stdio_ syscall
module, and adds a _net_ syscall module, which implements rudimentary
UDP functionality.

The WASM guest application uses these syscalls to build an UDP echo
server.
@steveej steveej force-pushed the pr/wasmtime-custom-syscall branch from 7424c9e to ee92f24 Compare November 26, 2019 11:15
@steveej
Copy link
Contributor Author

steveej commented Nov 26, 2019

I've put two related demos in this PR now, without great effort to extract common code. As the production code will likely in the wasmtime upstream repository, I think it's not worth the effort to refactor this further in here.

@npmccallum This is ready to be reviewed with the above in mind, please :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WASM: build a WASM echo server WASM: call a custom runtime method from the guest application
3 participants