Could anyone explain to me how Prisma 2 will use R...
# orm-help
s
Could anyone explain to me how Prisma 2 will use Rust even though it can be run as a NPM or Golang package? I didn’t realize that NPM is capable of running Rust binaries directly and I’m wondering what the architecture would be if it was running in a lambda function.
c
WebAssembly ?
j
for lambda, probably
and ffi to node/golang/etc.
d
No, nothing of that. What the blogpost doesn't make clear is that there is management code for you in the language of the client (JS / GO here) that starts the binary in the background for you.
It is basically a convenience wrapper for you for improved development flow.
h
If you ever used the zeit now package, it downloads the binary in the postinstall script. We are doing the same thing as well. We will download the binary on postinstall and we will run it via the wrapper whenever you will start your app.
s
That’s fascinating, so it sounds like it would work fine in a lambda? I can see Rust is supported in lambda functions.
h
Yes. It will be a complied binary so it will work there.
🎉 1
d
It will be possible, but it might not be working outright just because it's compiled to an executable. We still need to see how the runtime dependencies, like openssl, work out with Lambda.
s
That sounds great, I can’t wait for Prisma Day to check it out. Good luck with this last push!