Binary distribution

PowerIO.jl wraps the Rust powerio-capi library. On a supported platform it arrives as a prebuilt binary, so you do not compile anything.

Pipeline

  1. A version tag on eigenergy/powerio triggers its release-binaries workflow, which builds libpowerio_capi.<triplet>.tar.gz with the arrow, matrix, gridfm, dist, and prob features for Linux glibc (x86_64, aarch64), macOS (x86_64, arm64), and Windows (x86_64), and attaches the five tarballs to the GitHub release. Each tarball holds the library under lib/ (bin/ on Windows), the C header under include/, and the licenses.
  2. A reviewed .github/powerio-release.toml names the exact tag and binds it to the final Julia source digest. "Update artifacts" downloads the five tarballs, computes each one's SHA-256 and unpacked git tree hash, and asks gen/update_artifacts.jl to build Artifacts.toml. Before writing, the generator loads the host library and checks its ABI number (7), its version string against the tag, the core entry points the binding calls, and that it parses the GridFM fixture. If any of those checks fail, the update is parked and Artifacts.toml is left untouched. The workflow tests the exact result, commits only Artifacts.toml, pushes only when main has not moved, and dispatches registration for that exact SHA. See CONTRIBUTING.md for the state machine and recovery commands.
  3. Artifacts.toml is lazy, so Pkg.add downloads nothing; the tarball for your platform is fetched on the first call that needs the library.

A PowerIO_jll built from gen/build_tarballs.jl (the BinaryBuilder recipe) is the planned long term distribution; current releases use the artifact pipeline above.

Resolution order

The library resolves in this order:

  1. set_library!(path) or the POWERIO_CAPI environment variable,
  2. the saved Preferences.jl library override,
  3. a sibling powerio checkout's target/{release,debug} build, only when this package is itself a git checkout,
  4. the powerio_capi artifact,
  5. a plain libpowerio_capi on the loader path.

On an unsupported platform the artifact lookup fails, and the other entries let you keep working from a local build.

using PowerIO

set_library!("/path/to/libpowerio_capi.dylib"; persist=true)
clear_library!(persist=true)
PowerIO.set_library!Function
set_library!(path; persist=false)

Point PowerIO at a locally built libpowerio_capi (cargo build -p powerio-capi --release in the powerio Rust tree writes target/release/libpowerio_capi.{dylib,so}). An in-session override wins over POWERIO_CAPI, the saved Preferences.jl override, and the bundled artifact. Pass persist=true to save the path in the active environment's LocalPreferences.toml.

source
PowerIO.clear_library!Function
clear_library!(; persist=false)

Clear the in-session library override. Pass persist=true to also clear the saved Preferences.jl library override. POWERIO_CAPI, when set, still wins on this session's next call.

source
PowerIO.abi_versionFunction
abi_version() -> UInt32

The ABI version the resolved C library was built with (see pio_abi_version). Compared against PIO_ABI_VERSION, the version this binding targets.

source
PowerIO.library_versionFunction
library_version() -> String

The powerio crate version string the resolved library reports, such as "0.11.0". Informational; abi_version is the compatibility check.

source