-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Build ARM compatible CLI binaries #717
Comments
This can actually be disregarded, I didn't know of Rosetta 2 which automatically translates the code from intel to M1. Providing specific binaries for M1 would improve performance but is not strictly necessary. |
I have an M1 MacBook now. I can try to build arm64 Prisma CLI builds with pkg |
https://github.com/vercel/pkg
If this is true though, it might get more complicated... |
I think it worked :D I'm wondering if you @RobertCraigie have any input on how the binaries should be named. I can also build linux arm64 binaries while I'm at it I guess. Or since there will be lots of targets anyway, in theory I could also upload builds with different node versions Just needs to be adapted here https://github.com/prisma/prisma-client-go/blob/main/binaries/publish.sh#L20 and maybe some more code to put the targets in a variable and just loop through it for gzip+s3 upload |
Linux arm64 binaries would be great too, thank you :D
I don't think we're going to support binaries with different node versions any time soon but that would be a welcome change too :)
If you're wanting to stick to one node version I'd say to just try and stick to a similar naming scheme to the engine binaries, e.g. M1 -> And if you want to support multiple node versions you could use a similar naming schema to the OpenSSL engine versioning, e.g. |
I've also been looking into automating the CLI binary building process, would that still be possible when targeting ARM? |
Usually you can cross compile these, but sometimes you actually need a machine of the platform/architecture. |
EDIT: Unfortunately, cross compiling with arm indeed seems to be a bit tricky |
Actually it is not at all :D I published the binaries in the existing bucket with this scheme:
where I didn't test them though, so please let me know if they don't work. |
From 3.14.0 I will probably stop uploading the binaries like in the old scheme, and will use the scheme above |
Thank you so much! @steebchen Unfortunately I'm not sure if I can really test the new binaries on my machine as I have Rosetta 2 installed and I can't find a reasonable method for uninstalling it :/ But it seems to work, thank you again :D |
You can check if it's using the apple binaries by checking if the QE/CLI binary says 'Kind': 'Apple' in activitiy monitor. Note that the Go client is not using these yet though. |
@steebchen FWIW I've been using the x64 macOS and arm64 linux binaries with Prisma Client Rust and they seem to be working fine! |
Awesome! Thanks for letting me know @Brendonovich |
I've recently switched to an M1 mac and the currently binaries provided are not compatible with this chipset.
I do not know of the best solution for this as GitHub does not yet provide runners (actions/runner-images#2187) so cross compilation is probably the only real possibility unless someone on the Prisma team would be willing to compile and publish the binaries themselves.
From having a look at the
pkg
README it sounds like it should be possible with something like the following command however I have not tested it.This is relevant for Prisma Client Python as there is work being done to support ARM compiled engines: RobertCraigie/prisma-client-py#233
The text was updated successfully, but these errors were encountered: