Skip to content

Simple example of sharing memory and loading multiple modules

Notifications You must be signed in to change notification settings

easywasm/example-dynlib-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple example that follows DynamicLinking.

Essentially, we have a few wasm modules that can pass structs and strings to each other, via shared mem & host-implemented malloc/free.

  • I have implemented the host in js but other hosts could follow similar pattern.
  • I have implemented the wasm in C but other languages could follow similar pattern.
  • I added a thin wrapper around WASI and some stdlib stuff to aid in much lighter wasm. Currently, it does not implement much of stdlib, but this could be expanded by essentially copying wasi-libc, but importing malloc/free from host.

About

Simple example of sharing memory and loading multiple modules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published