mix c3nif.precompile (C3nif v0.2.0)
View SourceBuild precompiled C3 NIF artifacts for a matrix of target triples.
Maintainers run this task to produce a set of .tar.gz archives — one per
target — plus a checksum-<version>.exs manifest. The archives are then
uploaded to a release hosting location (typically a GitHub release), and
the checksum file is committed into the repository so consumers can verify
downloads.
Usage
mix c3nif.precompile
mix c3nif.precompile --target linux-x64
mix c3nif.precompile --module Elixir.MyApp.Nif --version 0.1.0Options
--target— target triple to build for. May be passed multiple times. Defaults to the matrix returned byC3nif.Precompiled.default_targets/0.--module— only build for a specific module. Defaults to every module in the manifest.--version— override the version string used in artifact filenames. Defaults to the OTP app'sMix.Project.config()[:version].--output-dir— where to write the archives and checksum file. Defaults topriv/precompiled/.
What it produces
For each target in the matrix, this task:
- Invokes
c3c build --target <triple>viaC3nif.Compiler.compile/1. - Wraps the resulting shared library in a
.tar.gzarchive. - Records the archive's SHA-256 in a
checksum-<version>.exsmanifest.