elixir-nx / xla

Pre-compiled XLA extension
Apache License 2.0
83 stars 21 forks source link

Release as a static library #20

Closed joelberkeley closed 1 year ago

joelberkeley commented 1 year ago

Is it possible to provide a static library release?

Atm I'm wrapping the API in extern "C" code and calling it from Idris. This means my Idris library requires two dynamic libs (XLA and the wrapper). This adds complexity, and it would be really nice to just have one.

seanmor5 commented 1 year ago

Unfortunately we don't really have a use-case for it in our libraries upstream, so it's not something we can officially support. It should; however, be easy to fork this and modify the build rules in extension/BUILD to achieve this. I would recommend looking here: https://docs.bazel.build/versions/main/be/c-cpp.html