prisma-dart icon indicating copy to clipboard operation
prisma-dart copied to clipboard

prisma web with dart

Open rectrick opened this issue 1 year ago • 3 comments

Hello, I have been following Prisma for months, but because of my specialization in Flutter, I am working on building an application for editing audio and video using Dart and Flutter. I found that Prisma is very suitable, but my application will support Web and Desktop. Does this image mean that Prisma does not support the Web and will not be ideal for my project? https://prnt.sc/fNgJY8CfwCD9

rectrick avatar Jun 02 '23 13:06 rectrick

@rectrick Unfortunately, Prisma's binary engine is developed using Rust. Although Data Proxy supports direct calls from the Web, it still needs to solve the CORS problem. And the Prisma engine does not support IndexDB.

I think this requirement can be resolved by submitting to https://github.com/prisma/engines to add IndexDB support and allow compilation of WASM module engines.

However Prisma ORM for Dart supports UniversalEngine package:orm/universal_engine.dart You can choose to build your own Data Proxy compatible service using Prisma engines to use it.

In general, Prisma cannot support the web, if you just want to share the types generated by Prisma on the web side, then you can look forward to the ORM 4 version (I am working hard to make it)

medz avatar Jun 03 '23 00:06 medz

Hello, any updates on this issue?

Litesoulo avatar Apr 14 '24 09:04 Litesoulo

@Litesoulo There is no progress because there are too few users of Flutter developing web pages. And Prisma is mainly a back-end ORM, and the front-end has almost no need to directly read the database.

Flutter WEB introduces Prisma to realize at most local SQL requirements such as libsql.js.

Of course, we do not exclude it from entering the front-end web page. But the joining period may be longer.

medz avatar Apr 14 '24 11:04 medz