philss / rustler_precompiled

Use precompiled NIFs from trusted sources in your Elixir code
181 stars 25 forks source link

Add support for variants targets #61

Closed philss closed 11 months ago

philss commented 11 months ago

This feature introduces variants, which are alternative versions that can be configured in compile time to load a specific precompiled NIF depending on the result of callback functions.

This enables developers to set different versions for the same target, depending on which versions of dependencies the target machine has. Remember that the callback will always run at compile time, in the machine that is doing the compilation.

This may be enough to fix https://github.com/philss/rustler_precompiled/issues/59 and https://github.com/elixir-explorer/explorer/issues/590

TODOs

philss commented 11 months ago

@josevalim would you mind to take a look? :)