4 ms·
>> For a time there seemed to be a lot of hype around writing SPAs in whatever language you like, not just JavaScript, but that seems to have cooled off somewha
by thefounder 7y ago
>> For a time there seemed to be a lot of hype around writing SPAs in whatever language you like, not just JavaScript, but that seems to have cooled off somewhat - at least that's my impression.
I'm building exactly that. A SPA using Go compiled to WASM. Some issues seem to be the startup time and the payload size.
- justinclift 7y agoSimilar kind of thing for myself. --- Standard Go: The resulting .wasm sizes aren't practical. 2MB+ for "hello world". That being said, it was only ~2.5MB for an inital mock 3d on 2d canvas test thing: https://justinclift.github.io/wasmGraph1/ https://justinclift.github.io/wasmGraph1/ (~550k when gzip compressed, as is commonly done when sending over a network) --- TinyGo: Much better sized .wasm files. ~500 bytes for "hello world". ~65k for a mock 3d on 2d canvas test: https://justinclift.github.io/tinygo_canvas2 https://justinclift.github.io/tinygo_canvas2 (~26k compressed) --- Rust: ~110k for a port of the same mock 3d on 2d canvas test: https://justinclift.github.io/rust_canvas_2d/ https://justinclift.github.io/rust_canvas_2d/ (~44k compressed) Note that this is done with lousy Rust code, as I'm still in the early stages of getting the hang of it. --- Rust (so far) seems to be the best trade off, at least for now. Although TinyGo's binary sizes are much better than it and standard Go, TinyGo breaks far too often, and reported blocker bugs aren't addressed for months. :(
- thefounder 7y agoThe resulting .wasm size of my app is about 70MB so at this time I believe you can only develop enterprise apps or very simple stuff.
- justinclift 7y agoYeah. That's why I'm doing stuff with Rust atm. I'd prefer TinyGo, but this seem to be working "ok" for now.