Hacker News new | ask | show | jobs
by mathek 392 days ago
Compiled to WASM it's ~700K, gzipped only 190K. But there's also BEAM code - the whole standard library is ~3M gzipped. We plan to do tree shaking to only include the used parts of the stdlib - then it should get way smaller for most use cases.
1 comments

That's a lot of wasm and beam. I tried to do it the other way -- compile beam straight to wasm and it seems to work in straightforward cases, producing wasm binaries in kilobytes sizes. With wasm fx it's even possible to do processes natively. You can find the link in bio.

Cool thing would be to somehow wire it up to liveview to make it possible to run some parts on the frontend side transparently.

I'm not doing any active development on it right now, but it looked pretty doable when I tried last time.

I think it is Firefly's approach (https://github.com/GetFirefly/firefly). They put a lot of work into it, but never made it fully functional, and it's not maintained anymore. So I agree that you get smaller binaries this way, but I believe we can get to acceptable sizes too, without creating and maintaining a custom compiler.