Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
This is pretty great! I highly recommend building a parser for Wasm, it shows off the nice design that it can be compiled in a streaming fashion and other nice properties.
I built a small parser for a wasm runtime I was going to hack at, although that lost steam and now I just contribute to wasmtime, but it was a great way to learn. The source if you’re interested in C++20 and coroutines: https://github.com/rockwotj/wasmcc
For some time I've been fascinated by the codebase of a small WAT compiler written in JavaScript.
https://github.com/stagas/wat-compiler/blob/main/story.txt
And I mean "small" as a real complement to how readable the entire compiler is. It's also been a great way to appreciate the design of the WASM text format and WASM overall. It's not a Lisp but has a similar feel to it.
I've been meaning to get more fluent at writing WAT directly, not for any practical purpose but just for pleasure of it. I could see myself gradually building up some abstractions to help me deveolp larger programs, perhaps a slightly higher-level language.
This seems sort of like understanding machine code vs assembly; it's much easier to learn WAT and translate to/from WASM as necessary using the wabt tools [0].
Either way its super cool how simple WebAssembly is, you can really get your hands dirty and understand exactly every detail of how your program runs!
[0] https://github.com/WebAssembly/wabt
I have a hand-written BF interpreter in WAT, along with hand-written asm.js for comparison, over here https://github.com/magcius/bfasm
I entered into WASM assuming it was simple and minimal but there are a lot of runtime edge cases that are quite surprising. I built an interpreter that passes all the non-SIMD test cases from the official spec. Would be interesting to clean-up the spec to be a real minimal execution only core. There is a real barrier to entry for producing new lightweight implementations.
https://github.com/peterseymour/winter
Related posts
- Let's Write a Malloc
- Do you think typescript will ever have native support on brosers? Or we will have only the JS type annotations?
- Ezno's checker (a Javascript type checker and compiler written in Rust) is now open source
- Polkadot Forum - Advanced Level Discussion
- Is there a TypeScript to native compiler available?