Code Monkey home page Code Monkey logo

wasm-metal's Introduction

WASM Metal

A bare metal physical implementation of WebAssembly. That's right, a WebAssembly CPU. Inspired in part by this amazing talk.

Development

GUI Microarchitecture Simulator

git clone https://github.com/lastmjs/wasm-metal.git
cd wasm-metal
npm install
npm start

Go to http://localhost:5000 in your web browser.

RTL Microarchitecture Simulator

Not implemented yet.

Loading Microarchitecture Implementation to FPGA

Not implemented yet.

Roadmap

  • Understand the WebAssembly ISA
  • Implement the mircoarchitecture in HTML/CSS/JavaScript
    • This will be a GUI simulator of the microarchitecture
    • This simulator will become the specification for the microarchitecture
    • It will allow us to quickly experiment with hardware configurations
    • It will allow us to iterate and learn how the microarchitecture should work
  • Implement the microarchitecture as an RTL design in an HDL
  • Simulate the RTL design
  • Test the implementation on an FPGA
  • Design the ASIC

Why is this a good idea?

  • Maybe it's not, but who cares
  • The world is moving to WebAssembly
  • Some of the biggest and potentially most world-changing projects are implementing their virtual machines as WebAssembly virtual machines (DFINITY, Ethereum)
  • The bytecode is being designed as a compilation target for low-level languages first
  • The bytecode is meant to execute at near-native speeds on a variety of underlying ISAs
  • Java processors already offer potential benefits, even being compilation targets for a high-level language
  • Cutting out the translation from WebAssembly to the underlying ISAs could provide efficiency benefits
  • We could get rid of WebAssembly virtual machines entirely, and replace them with WebAssembly physical machines
  • If all SIM cards are Java processors, imagine what WebAssembly processors could do. I'm betting that WebAssembly is a better bytecode than Java bytecode for what Java bytecode is doing with microcontrollers, so WebAssembly could take over all spaces that Java processors currently have

Prior art

wasm-metal's People

Contributors

lastmjs avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.