philss / rustler_precompiled

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

Make rustler an optional dependency #11

Closed josevalim closed 2 years ago

josevalim commented 2 years ago

This means downstream dependencies, such as Explorer, will need to add Rustler as a :dev only dep. But the benefit is that users of explorer no longer need to download toml, jason, or rustler.

philss commented 2 years ago

@josevalim the problem with this is that when people want to build from source we need Rustler installed. If the package maintainer is adding the dependency as :dev only, how can we be sure that the user has Rustler installed? I could add a "compiler" module, but I'm not sure if this is a good idea.

josevalim commented 2 years ago

@philss the parent will add :rustler as an optional dependency too. And if you want to compile by hand, then you need to add rustler as a depednency too.

philss commented 2 years ago

@josevalim oh, makes sense! I will change the error message as well to mention the optional dep. Thanks!