Comment by pdubroy
4 hours ago
Edit: changed slightly to provide a more useful answer.
No, it doesn't — not this version of the book at least. We only cover WebAssembly 1.0.
That said, as my co-author says below, there's really not much to tail calls. Once you've worked through the book, you'd be able to grok tail calls pretty quickly.
As an aside — 2.0 was announced just a few weeks after we launched the book, and 3.0 a few months ago. And with 3.0 (which added tail calls), the spec has more than doubled in size vs 1.0, so it would be hard to cover everything.
We've talked about doing a new chapter to cover some of the interesting parts of 2.0 (e.g. SIMD), but covering everything in 3.0 (garbage collection, typed reference, exception handling, tail calls…) feels almost like an entire 2nd book!
Co-author here.
if you are interested in tail calls you just need to understand the call instruction which we cover in the book and then replace it with either:
- return_call <funcidx>, the tail-call version of call
- return_call_indirect <tableidx> <typeidx>, the tail-call version of call_indirect
More info here: https://github.com/WebAssembly/tail-call/blob/main/proposals...