-
Notifications
You must be signed in to change notification settings - Fork 69
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 have a hybrid shell e.g. Rust+Swift/Kotlin #165
Comments
Hey there, my sincere apologies for slow response (have been on annual leave). I think the idea of having shell-side capability implementations in Rust is interesting (if I understand you correctly). This would, I guess, raise the abstraction level of the capability, encouraging a fatter shell-side implementation. My personal preference is to make the shell-side implementation as thin (and therefore as generic) as possible. This encourages as much logic as possible to be pushed to the core (or a core, if you want to keep the logic separate/resuable). But I suspect this may not always be practical (if it requires rewriting an existing library, for example, to push the logic inwards and the side-effects outwards). |
Thank you for the response, I was wondering if composable applications might be a useful here, but could not find any examples or docs. My thought was that nested Apps might support a rust shell or pass the capability request to a parent App. The outer most App would continue to route unsatisfied capabilities to one of the runtime host shells. I seems like this would allow each App to be tested in isolation, tests could still validate capability calls. When an App is nested in a parent App, only the capabilities that the parent App calls would be tested? For my use case, the render capability would call out to the host shell. At the moment all other capabilities would be serviced by Rust modules. I don't have the bandwidth to develop/test identical capabilities in multiple languages. |
Right, got you. Yeah, I think that if the shell-side of a component becomes a mission to write in multiple languages, it may indicate that the capability is too high-level. |
Thanks, I'll try that pattern. |
I have an iOS project that is already using Rust libraries via FFI.
I have been looking for a solution to better structure this App as it grows. I'm expecting to integrate more Rust libraries.
I took this route to simplify migrating the App to Android and Desktop.
Crux looks like a great solution for the functional core.
The rust libraries I am currently using provide database and file sync capabilities.
I can support the capabilities in Swift and route Requests to the third party Rust libraries where necessary.
This does not seem optimal, is there any support for a hybrid shell with some requests getting routed to rust implementations and some to Swift/Kotlin?
The text was updated successfully, but these errors were encountered: