-
Notifications
You must be signed in to change notification settings - Fork 58
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
is it possible to be used with Flutter? #225
Comments
It should be possible, but there are a few hurdles we haven't overcome, mostly because the Flutter use-case seems somewhat weak - if you're going to build UI in Flutter, you could adopt the architecture and build in Dart. That said, I'm sure there are hybrid approaches where it would be valuable. We're interested in supporting Flutter, but to be fully transparent - we don't have a gread deal of experience with Flutter or much need for it, so we'd love to find a champion for that integration to help get it working. Flutter integration has first been discussed in #78, can we continue the discussion in that other issue, please? |
@charypar same question in case of react-native, is it possible to use it? I went through the documentation and examples but I am not sure whether is it possible to use or not. |
@dancixx In theory, yes. 🙂 In practice, getting it through the build tooling might be a bit challenging. I see two approaches that should work:
We don't have examples of this setup, because it seems like a somewhat redundant stack. The primary target for Crux are the native UI frameworks in order to get a native, idiomatic user experience. If you're building in React Native already, you might as well build the whole app in TypeScript, there isn't a great deal to gain from having Crux involved (other than the magic of Rust 🦀), and it should be entirely possible to replicate the Elm-like architecture with something Redux-like and 90% of the testability benefits. Now with that said, I can certainly imagine a scenario in which for example you'd want to use Crux to support a platform not supported by React Native yet (let's say a CLI, or reusing the code ona server, for the lack of a better example), or you might want a gradual migration path from React Native to Crux with Swift UI and Jetpack Compose, in which case one of the two approaches above should work - ultimately the Crux core is quite a straightforward library, from the perspective of the shell. Curious about your use case, would you mind sharing some more context? |
@charypar my main motivation is using rust everywhere if its possible. I am really big fan of rust and on other hand I love to use react-native to make mobile apps. It is not real native but using native components what is much better like flutter canvas solution and more time efficient like native solutions, and if u are take care about performance it almost the same like native, and futhermore the new arch is really promising in case of performance. There are some examples how is it possible to use rust code in react-native but it requires some c binding so it doesnt worth it that way. Btw this project is awesome and there growing and promising rust based cross platform solutions like Xilem, Ribir, Tauri etc. which can give us alternatives. |
Ah, well that makes perfect sense to me, Rust is indeed amazing 🙂 If you do try getting Crux to work with RN and hit any barriers, feel free to open issues, link to some half-working code, or join us on Zulip and we'll try and help where we can. |
I know flutter have a Flutter Rust Bridge,
But i wanna know if it is possible to use Flutter instead of Swift UI or Jetpack Compose ....
The text was updated successfully, but these errors were encountered: