lastmjs / Wasm Metal
Licence: mit
A bare metal physical implementation of WebAssembly. That's right, a WebAssembly CPU.
Stars: ✭ 167
Programming Languages
typescript
32286 projects
WASM Metal
A bare metal physical implementation of WebAssembly. That's right, a WebAssembly CPU. Inspired in part by this amazing talk.
GUI Microarchitecture Simulator
View the live demo.
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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].