Re:I love building a startup in Rust. I wouldn't pick it again
by d-z-m on Sunday February 19, 2023 @06:32AM
(#34856675)
> How is this relevant? Serving a JS application to a client is not like serving a JSON API.
In some JS applications, the way the frontend code communicates with the backend is via JSON API endpoints. I believe GP was just pointing out that you can write that JSON API in any language you want.
> not to mention that Go has a very limited WASM story, so your "realistic" choices for shipping back end code to the front end are C++ and Rust.
Can you elaborate on this? How is it limited in comparison to say, Rust.
Re:I love building a startup in Rust. I wouldn't pick it again
by legerdemain on Sunday February 19, 2023 @01:09PM
(#34860150)
My understanding is that to get reasonable WASM file sizes, one must use tinygo (a C reimplementation). tinygo is a WIP, although I wish I could find a better updated description of what's missing than this page on their site: https://tinygo.org/docs/reference/lang-support/
Re:I love building a startup in Rust. I wouldn't pick it again
by d-z-m on Sunday February 19, 2023 @02:22PM
(#34860869)
This page[0] seems to have some good information(on stdlib support at least).
As far as file sizes go, you're right. It might be possible to get better results deploying a brotli'd or gzipped file instead[1].
[0]:https://tinygo.org/docs/reference/lang-support/stdlib/ [1]:https://github.com/golang/go/wiki/WebAssembly#reducing-the-s...
Edit: not to mention that Go has a very limited WASM story, so your "realistic" choices for shipping back end code to the front end are C++ and Rust.