Open medz opened 10 months ago
internally I'm using Zig. So I may also release a Zig version of Prisma in the future
its very intresting
that would be amazing if Zig took off in the future.
Any news?
Any news?
@listepo Sorry, no new news. Maybe https://github.com/prisma/prisma-engines/pull/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:
Prisma engine has been working towards the WASM build goal
The binary engine has been phased out since last year (most of the third-party language implementations are still in use)
There is no clear direction for Prisma to move in. I can only work as hard as possible on the engine provided by Prisma, because any implementation of my own can be easily destroyed by the above. (This is not the scope of Prisma's official obligations)
My personal energy is really limited. To put it bluntly, China's current unemployment rate is very high and everyone is working hard to make a living, otherwise they will not be able to eat tomorrow. (I am no exception)
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.
@MulverineX
Thank you for your understanding and support.
This could be very powerful, but it does come with a small performance hit
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.
Im not sure what this means, but dont those third party implementations all rely on the binary engine in some way?
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)
strong official or community support for loading WASM modules, but Dart does not.
luckily this is actually not the case! https://github.com/juancastillo0/wasm_run
continuing to maintain binary engines after all switches to WASM is meaningless for Prisma official and will increase costs
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. I am sorry that I deleted it after trying this technology (because I gave up the huge upstream dependency work)
Currently, the only thing left of Prisma Dart is the client based on the official Prisma engine. Again, I am sorry that I no longer have the energy to try new technologies. My current personal plan for Prisma Dart (not disclosed) is as follows:
Stability maintenance (I will fix it once someone submits a bug)
Remove code_buinder
from the code base (very low priority, I have always planned to remove code_builder
/build_runner
/json_serializable
, and it took me a long time to successfully remove the build_*
ecosystem package)
Migrate fromJson
and toJson
of
The reason I tried Zig to write the engine before was that Rust cross-compilation was too complicated, while Zig was much simpler (it can be said that it is very easy to cross-compile)
News:
🎉Now @Prisma Dart v5.2.1 is released with @FlutterDev integration v0.4, using a new package architecture:
🌲We can easily implement more platform integrations in the future.
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 orm
package, and the integration of the remaining three platforms is just to make it easier for Flutter Desktop to get the engine (just depend on it)
In the orm_flutter
package, it just determines the platform and forwards the engine instance.
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