2 min read
What Walt tries to solve?
Writing zero-overhead, optimized WebAssembly code is difficult. You need to write very plain C code, compile that to .wast and then optimize that result. Then, finally, you’re ready to compile that into the final WebAssembly binary. Walt attempts to take C/Rust out of the equation and write “as close to the metal” as possible without losing readability.
How it solves the problem?
What Walt does is, it provides a thin layer of syntax sugar on top of .wat text format. This improved syntax will give developers direct control over the WebAssembly output. This means that there should be minimal to none post optimization to be done to the wast code generated.
For example, here is what a .walt module, which exports a recursive Fibonacci function, looks like:
When this code is passed through the Walt compiler, you get a buffer which can be used to create a WebAssembly module with a fibonacci export. Al this is done with familiar JS syntax and without any external binary toolkits.
What are some of its use cases?
Anyone who is interested in WebAssembly but is not familiar with system languages can get a quick start with Walt. It can be used in the following scenarios:
- Web/Node libraries
- Web VR/ AR
- Projects depending on heavy real-time computation from complex UIs to 3D visualizations
To know more about Walt and how you can get started with it, check out its GitHub repository.