-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support Flutter App #328
Comments
Can not wait:) |
@listepo It is not feasible to implement the C ABI engine as a third party because it has already failed once. After the build is completed, the upstream repo is Prisma's internal engine. They have many destructive commits every day, making it difficult for the downstream to maintain it continuously (especially if it is only me. case) In order to achieve the unification of Dart Server-side and Flutter, WASM is the best choice. But the real problem is that Dart does not have the ability to load WASM natively. Flutter only experimentally allows Flutter code to be compiled into wasm. Many helplessness and many problems are like mountains before our eyes, making it difficult to overcome. |
@medz any news? |
The latest news, the C ABI engine of Prisma Engines. Once it is Merge, I will immediately implement the support of Flutter. |
is there any success? |
@listepo |
@listepo I noticed that it has been merged, thank you for bringing this matter to my attention again. I am following up and looking for any information about the C ABI engine and official examples of its use in RN. At present, it seems to only support SQLite, but it is sufficient, and most Flutter developers do not want to link to remote databases. SQLite+Prisma can help a large number of developers complete local data structure storage and have intuitive CRUD APIs |
@medz I'll be happy to help with testing |
Hy @medz i am using prisma-dart for my flutter desktop application. I didn't struggle or have error until now. How can i help? All the above data table, numbers and authentication is implemented using prisma-dart. |
Bad news, I still need to implement a C ABI engine myself. But Prisma has provided a great template |
@medz How is it going? help is needed? |
why is that? In what way is theirs unsuited for this library? I'm also curious what your timeline is looking like, and am interested in helping, hopefully more than simply testing & working on #281. After getting https://github.com/openwebf/mercury fully working for my usecase, this library is what I'm waiting on to continue with https://github.com/RefractureMedia/refracture-music edit: just noticed your status, get well soon! I really appreciate all of the work that you've done thusfar on the library! Also, once funds are a little less tight on my end I plan on setting up recurring Sponsorship for your work on this library, I understand that motivation for open source projects can be pretty tough at times. |
Another potential route this project could take is use of https://github.com/fzyzcjy/flutter_rust_bridge , which appears to be reaching a reliable, efficient, and cross-platform state. |
@MulverineX I hope that C Engine can also be applied on the server. |
What do you mean? |
@MulverineX The desktop architecture is too complex, and each architecture corresponds to an engine. Therefore, during the application startup phase, it is most reasonable to determine whether an engine needs to be downloaded and enter the download waiting page. Otherwise, your desktop app might be very large. For the mobile side, whether including library files in the app or downloading library files is completed by the developer before building, and the packaging will only include necessary files. If Prisma provided a dynamic library, this problem would not exist. (But judging from the Prisma roadmap, it is unlikely to be possible for a long time) |
Flutter requires per arch build regardless, most of the time. What added complexity is there here? |
@MulverineX Maybe you're right, it seems complex architecture only happens on Linux. macOS/Windows can include binaries directly. It seems that a special flutter.assets converter needs to be written to solve the schema file problem on Linux. Maybe I’m overcomplicating my thoughts😊 |
Nice |
@medz maybe it makes sense to rename from |
@listepo I think the goal here is to improve this library to the point where it can be the defacto ORM for Flutter. It wasn't already a taken name, and Prisma is generally the best option out there. Obviously, the engine still needs some query crafting work to improve performance down the road. Still, since Prisma has corporate sponsors/investment I'm confident the team will continue to iterate. Also, since this library directly interacts with the query engine, |
@listepo I originally intended to do this, but the names are all taken (and not actually used). I tried to contact the author and the dart team through the pub.dev guide, but no emails were returned. |
@listepo Another fact is that the prisma marketing team does not want third-party clients to use short prisma-related names. So you will see that the documentation website of prisma orm for dart was updated to |
@medz how to create and use migrations? |
@listepo Creating migrations is the same as Prisma, using the To apply migrations, call the Documentation is here https://prisma.pub/getting-started/flutter.html#migrations |
@medz thanks |
Really looking forward to desktop platforms here, once they're available I can really begin to iterate on my app, as its targeting desktop first. |
|
that would be amazing if Zig took off in the future. |
Any news? |
@listepo Sorry, no new news. Maybe prisma/prisma-engines#4913 is one of the news. My original plan was to use the binary engine to build macOS/Windows/Linux support (of course, it is not a high priority) but I did not try my best to implement it for the following reasons:
Combining the above, it is difficult for Prisma Dart to make new breakthroughs. Completing similar implementations for most of the Prisma official engine is the best I can do at this point. |
|
Thank you for your understanding and support.
This means that it becomes more difficult to use the Prisma engine in environments that do not support loading WASM natively. Currently, other third-party languages have strong official or community support for loading WASM modules, but Dart does not. The Dart official team is currently committed to using Dart to build WASM modules and has no plans to load WASM modules at the moment.
Yes, currently third-party languages are using the Prisma binary engine. But almost all Prisma official clients are no longer used. As far as I know, the Wasm version of the last Scheme Engine in Prisma's official engine is about to be built. Perhaps after the last remaining binary engine implemented WASM migration, several versions of bug fixes were made. Prisma official will no longer maintain or even completely stop building binary engines (this is just my guess, because continuing to maintain binary engines after all switches to WASM is meaningless for Prisma official and will increase costs) |
luckily this is actually not the case! |
not necessarily, Many people will still want to use the system binary engine for better performance. |
yes native code better |
@medz I would like to try to help, could you share the Zig code? |
@listepo Unfortunately, I deleted it after Prisma released the CABI engine. Because its essence is to use Rust FFI to write C ABI, and then call it from Zig to build a unified engine. Currently, the only thing left of Prisma Dart is the client based on the official Prisma engine.
|
News:
https://github.com/medz/prisma-dart/releases/tag/orm-v5.2.1%2Borm_flutter-v0.4.0 |
@kidusdev Hey, the way you integrate Flutter with Prisma in Windows is exactly what I will do next to support macOS, WIndows, and Linux. Interested in contributing it? There is already a ready-made implementation of the binary engine in the In the This request is because I need to complete more complex web integration, which usually uses WASM and uses lower-level APIs. |
Prisma Dart Client was originally built for the Dart server-side, and we look forward to introducing it in Flutter.
Progress
The text was updated successfully, but these errors were encountered: