For finding the .so file, the most common pattern is using :code.priv_dir/1.
See Reading files from your priv dir in elixir - Mintcore
Though with the updated build setup in Elixir 1.9+ it’s more stable to put it in the _build folder. I just copy the Makefile from GitHub - elixir-circuits/circuits_gpio: Use GPIOs from Elixir · GitHub .


















