After building a Rustler package (`harfbuzz_ex` for using Harfbuzz font shaping), I thought I’ll be fancy and precompile the NIF for
matrix:
nif: ["2.15", "2.16"]
job:
# Linux (standard x86)
- { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 }
# macOS ARM
- { target: aarch64-apple-darwin, os: macos-14 }
# Windows
- { target: x86_64-pc-windows-msvc, os: windows-2022 }
- { target: x86_64-pc-windows-gnu, os: windows-2022 }
I obtained the checksum after the NIFs were built, and then published the package to Hex. I tested it in a new Mix project and it worked fine (M1 Mac).
I tried to build a Livebook to document how the package is used. Even though I’m on the same machine as what-worked-for-new-Mix-project, Livebook reports not being able to download the precompiled NIF:
==> harfbuzz_ex
Compiling 4 files (.ex)
== Compilation error in file lib/harfbuzz_ex.ex ==
** (RuntimeError) Error while downloading precompiled NIF: the precompiled NIF file does not exist in the checksum file. Please consider run: `mix rustler_precompiled.download HarfbuzzEx --only-local` to generate the checksum file.
As the package maintainer, I don’t know how to troubleshoot this and provide the right precompiled NIF. Any advice?






















