New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web support #34
Comments
Maybe we would need a workaround, such as using async runtime crate for webassembly. |
There is really no need for web, because the pure web is too strong, and the mobile terminal and desktop should be perfect |
Yes, I agree that mobile and desktop support should be perfect, and we should not compromise those features in order to support the web. Maybe supporting a subset or providing a separate I believe that web support should be a separate feature if implemented. The demand for it IS much lower than native platforms, yes :) |
The web can be used, but the performance is very slow. I have experienced the online demo, and it is not as smooth as the native web. |
Hi @107295472 , thanks for telling us about the web :) Do you mind if I ask you for the link to that web app? Was it something built with Rust backend? |
No, flutter's web is wasm |
Yes, as far as I know, Flutter uses WASM and JavaScript for the web and it's known to be very slow. Why the web support is being considered though is that Flutter team is trying to make the web part faster and there are some demands from various people that want to use the same Rust code for the web backend. Hope we come up with a reasonable idea someday! The main drawbacks right now:
|
I disagree, many people use Flutter for mainly mobile and web, with desktop usage being much lower (how many desktop apps have you installed recently compared to going to the web version? And most desktop versions like Figma, Slack etc are just Electron wrappers around the web app). There are also a lot of web based Flutter apps like Rive. So I would definitely like to see web support for this library, I'm using |
While I agree that Flutter is mainly used for mobile and web as opposed to desktop, the addition of rust makes desktop more appealing. My biggest issue with Rust is UI support, so being able to use Flutter to develop UI desktop applications is welcoming. I don't have an issue with supporting web, but I do like that desktop support is one of the the main focuses of this project. |
Finally, support for the web seems to be successful and the new version will be released in a few days! This huge commit 7410bfa contains all the core changes. Now you can target all 6 platforms with a single codebase using Flutter and Rust. The way to use this framework remains almost the same, only with some slight changes to the exposed Rust template. Version 2.0 will be published once the minor tasks below are done 😊
For version 2.1:
|
The web has very many restrictions due to the sandboxed environment. Native threads, atomics, and time are not possible in webassembly and therefore many features are missing from the Rust's
std
and other crates due to these limitations.flutter_rust_bridge
does provide some way to utilize web workers and streams thanks to its bindings with JavaScript. However, there are still additional support needed from various libraries.We think that when Threads Proposal for WebAssembly is fully accepted and realized, support from Rust and various libraries will mature. For now, there is a long way to go.
The text was updated successfully, but these errors were encountered: