Skip to content

xiaoxiaojx/wvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wvm

A toy WebAssembly virtual machine.

It is mainly used for learning 📖 ✍️, Inspired by twvm and WebAssemblyToolkit.

Getting Started

make build && ./wvm ./hello-world.wasm
-> parse
 -> parseMagicNumber: [ 0 97 115 109 ]
 -> parseVersion: [ 1 0 0 0 ]
 -> parseSection
  -> parseSectionId: 1
  -> parseSectionId: 3
  -> parseSectionId: 7
  -> parseSectionId: 10
-> instantiate
 -> func
 -> entryFuc: add
-> execute
 -> call: 0,paramCount: 2
  -> local.get: 0
  -> local.get: 1
 -> call: 1,paramCount: 2
  -> local.get: 0
  -> local.get: 1
  -> op.I32Add
   -> x: 2,y: 1
   -> ret: 3
ret: 3

About

A toy WebAssembly virtual machine.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages