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

Consider sharing types between `Rust` and `TypeScript` in `Wasm` modules

Open jkomyno opened this issue 3 years ago • 0 comments
trafficstars

Currently, when using format or get_config in @prisma/prisma-fmt-wasm, we accept a String as an input, which is then parsed as a JSON-encoded object. The structure of this object is not shared with TypeScript, which makes the interaction between the two languages awkward (see internal thread). This is highlighted by this demo repository.

  • We should consider using tsify to share types between Rust and TypeScript in Wasm modules
  • For the time being, the main concern raised by @tomhoule is that we'd need to add third-party dependencies that heavily rely on macros

jkomyno avatar Sep 30 '22 13:09 jkomyno