
Lightbeam: A Highly-Optimising Streaming WebAssembly Compiler (2019) [video] - nonsince
https://www.youtube.com/watch?v=q8c5n_1dQm4
======
karavelov
Nowdays merged into wasmtime:
[https://github.com/bytecodealliance/wasmtime](https://github.com/bytecodealliance/wasmtime)

~~~
jeltz
Do you know how wasmtime comapres to wasmer?

~~~
skavi
I was looking that up myself and came across a reddit thread [1] with a Wasmer
employee seemingly equitably laying out the general differences.

This, however, elicited a response from a Mozilla employee claiming it wasn’t
telling “the whole story.”

Does anyone know what the differences in perspective are here?

[1]:
[https://www.reddit.com/r/rust/comments/cx4nj3/comment/eykkie...](https://www.reddit.com/r/rust/comments/cx4nj3/comment/eykkieb)

~~~
snek
wasmer used a large amount of wasmtime code without proper attribution. I'm
not sure this is a problem anymore but habits die hard and the owner of the
company has not been shown to be the best person (won't go into that here
since it's not as tech related)

~~~
syrusakbary
We used the mmap implementation (20 lines of code) which is also reflected in
our attributions :)

[https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS....](https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md)

Perhaps I'm missing something. Were you referring to some other code I'm not
aware of?

~~~
snek
Yeah I think you're missing the part where you only added that file after
being called out on twitter lol. The only reason I say "habits die hard" is
because you consistently refuse to acknowledge that this ever happened.

------
feniv
If you can't watch the video, there's a blog post writeup of Lightbeam by the
presenter here -
[http://troubles.md/posts/lightbeam/](http://troubles.md/posts/lightbeam/)

------
tom_mellior
> but for a streaming compiler... you just don't have liveness analysis

I understand that streaming compilation wants to start compiling before the
entire _module_ has been read, but is it really that important to start
compiling _functions_ before their entire definition has been read? Seems like
a huge artificial hurdle.

~~~
snek
functions are the part you compile, everything else is just runtime data

~~~
tom_mellior
The question was why one would want to start compiling a function before all
of its code is available.

~~~
Groxx
Purely guessing, but: gigantic generated funcs are A Thing™, and pretty often
I'd expect that you don't even need to know the full contents of a func to
being executing it. Some structures would require it, sure, but not all. You
could treat it as speculative execution up to the point where you can't, and
then you just wait and continue-or-error when you know more.

~~~
nonsince
Author here: you got here before me but this is precisely the right answer,
although it’s more about not needing the full contents to start _compiling_,
rather than executing necessarily. Supporting streaming execution parallel to
compilation is absolutely possible, but a tougher challenge that isn’t
necessarily for our purposes.

