E-xyza / zigler

zig nifs in elixir
MIT License
893 stars 44 forks source link

Support precompiling NIfs #479

Open maennchen opened 2 months ago

maennchen commented 2 months ago

It would be awesome if it was possible to precompile (and possibly cross-compile for different architectures) the Nifs for published libraries. This would make the installation by the user of the library a lot and removes the requirement to install Zig.

This has already been done by other Nif providers like rustler: https://github.com/philss/rustler_precompiled

It usually works by building the nifs and adding the object files to a GitHub release.

When a user installs the library from Hex, the library looks if the files exist locally and downloads them from the release if not.

ityonemo commented 2 months ago

yep. This is on the todo list in VERSIONS.md I will try to do it for 0.14 (thought I had an issue up for it but i don't see it anymore)