hydroplane-auto 0.2.0

Build-time MIR analysis for hydroplane `#[kernel]`s: a nightly StableMIR pass (quarantined out-of-process) that measures each kernel and feeds per-kernel codegen decisions back to the `#[kernel]` macro.
Documentation
  • Coverage
  • 93.33%
    14 out of 15 items documented0 out of 5 items with examples
  • Size
  • Source code size: 32.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 114.2 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • oh-yes-0-fps/hydroplane
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oh-yes-0-fps

hydroplane-auto

Build-time MIR analysis for hydroplane #[kernel]s. It measures each kernel body (stack bytes, varying locals, memory ops, branches, calls) and feeds the metrics back to the #[kernel] macro, which uses them to narrow the element types each kernel dispatches over.

Wire it into the crate that defines the kernels:

[build-dependencies]
hydroplane-auto = "0.0.1"
// build.rs
fn main() {
    hydroplane_auto::build_script();
}

The analysis is a StableMIR pass on a pinned nightly rustc_driver, run out of process: the driver source ships inside this crate, is compiled against the pinned nightly at build time, and analyzes a nested build of the consumer crate. The consumer stays on stable; this crate itself is pure stable Rust with no dependencies.

It no-ops (with a cargo warning, and macro defaults apply) on debug builds, on non-Unix hosts, when the pinned nightly toolchain isn't installed, or when KANALYZE_DISABLE is set.