Add precompiled NIF artifacts via rustler_precompiled (#27)#49
Open
kipcole9 wants to merge 2 commits intoelixir-nx:mainfrom
Open
Add precompiled NIF artifacts via rustler_precompiled (#27)#49kipcole9 wants to merge 2 commits intoelixir-nx:mainfrom
kipcole9 wants to merge 2 commits intoelixir-nx:mainfrom
Conversation
Consumers on aarch64/x86_64 macOS, aarch64/x86_64 Linux glibc, and x86_64 Windows MSVC no longer need a Rust toolchain — Ortex downloads a prebuilt NIF from the GitHub release. Source build remains the fallback for unlisted targets and via ORTEX_BUILD=true. * lib/ortex/native.ex: use RustlerPrecompiled (handles both download and force_build paths). Ortex.Util.copy_ort_libs still runs after source build to stage libonnxruntime when the toolchain produces a dynamically-linked NIF. * mix.exs: add :rustler_precompiled, make :rustler optional, ship CHANGELOG.md and the checksum file in the package. * .github/workflows/release.yml: matrix builds 5 targets × 2 NIF versions on tag push, custom packaging step bundles libonnxruntime when present (no-op for static-linked builds), uploads to a draft release. * .github/workflows/ci.yml: forces source build via ORTEX_BUILD=true so PR validation isn't dependent on release artifacts existing. * checksum-Elixir.Ortex.Native.exs, RELEASE.md, CHANGELOG.md, README.md: pinned checksums, release runbook, changelog entry, precompile target list and source-build instructions. Verified end-to-end on Debian Bookworm with no Rust toolchain via a mix deps.compile + tinymodel.onnx inference test in Docker.
Consumers on aarch64/x86_64 macOS, aarch64/x86_64 Linux glibc, and x86_64 Windows MSVC no longer need a Rust toolchain — Ortex downloads a prebuilt NIF from the GitHub release. Source build remains the fallback for unlisted targets and via ORTEX_BUILD=true. * lib/ortex/native.ex: use RustlerPrecompiled (handles both download and force_build paths). Ortex.Util.copy_ort_libs still runs after source build to stage libonnxruntime when the toolchain produces a dynamically-linked NIF. * mix.exs: add :rustler_precompiled, make :rustler optional, ship CHANGELOG.md and the checksum file in the package. * .github/workflows/release.yml: matrix builds 5 targets × 2 NIF versions on tag push via philss/rustler-precompiled-action, uploads to a draft release. * .github/workflows/ci.yml: forces source build via ORTEX_BUILD=true so PR validation isn't dependent on release artifacts existing. * checksum-Elixir.Ortex.Native.exs, RELEASE.md, CHANGELOG.md, README.md: pinned-checksums placeholder, release runbook, changelog entry, precompile target list and source-build instructions. Verified end-to-end on Debian Bookworm with no Rust toolchain via a mix deps.compile + tinymodel.onnx inference test in Docker.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add precompiled NIF artifacts via rustler_precompiled (#27). This is intended to make installation easier for most users while preserving the manual build process option for anyone that wants it.
Consumers on aarch64/x86_64 macOS, aarch64/x86_64 Linux glibc, and
x86_64 Windows MSVC no longer need a Rust toolchain — Ortex downloads
a prebuilt NIF from the GitHub release. Source build remains the
fallback for unlisted targets and via ORTEX_BUILD=true.
@lawik requested Nerves cross-compilation support too and I'm
willing to tackle that if this PR is accepted.
Changes
and force_build paths). Ortex.Util.copy_ort_libs still runs after
source build to stage libonnxruntime when the toolchain produces a
dynamically-linked NIF.
CHANGELOG.md and the checksum file in the package.
versions on tag push via
philss/rustler-precompiled-action,uploads to a draft release.
so PR validation isn't dependent on release artifacts existing. Preserves
the existing behaviour.
README.md: pinned-checksums placeholder, release runbook,
changelog entry, precompile target list and source-build
instructions.
Verified end-to-end on Debian Bookworm with no Rust toolchain via a
mix deps.compile + tinymodel.onnx inference test in Docker.
Updated Release process
Since we generate precompiled artefacts on tag push, the release process is a bit different and documented in RELEASE.md. It follows the standard process for other
rustler_precompiledprojects. In short:ORTEX_BUILD=true mix rustler_precompiled.download Ortex.Native --all