#buildpack #helper #write #download #utilities #io-write #cnb

libherokubuildpack

Opinionated common code for buildpacks implemented with libcnb.rs

26 releases (breaking)

new 0.20.0 Apr 12, 2024
0.19.0 Feb 23, 2024
0.18.0 Feb 12, 2024
0.17.0 Dec 6, 2023
0.3.0 Sep 20, 2021

#260 in Network programming

Download history 52/week @ 2023-12-29 47/week @ 2024-01-05 32/week @ 2024-01-12 7/week @ 2024-01-19 70/week @ 2024-01-26 24/week @ 2024-02-02 44/week @ 2024-02-09 69/week @ 2024-02-16 244/week @ 2024-02-23 216/week @ 2024-03-01 55/week @ 2024-03-08 42/week @ 2024-03-15 26/week @ 2024-03-22 239/week @ 2024-03-29 110/week @ 2024-04-05

423 downloads per month

BSD-3-Clause

130KB
2K SLoC

libherokubuildpack   Docs Latest Version MSRV

Common utilities for buildpacks written with libcnb.rs. Originally designed to be only used for official Heroku buildpacks. It was moved into the libcnb.rs repository as an incubator for utilities that might find their way into libcnb.rs proper.

This crate is optional and not required to write buildpacks with libcnb.rs. It provides helpers that buildpack authors commonly need. Examples are digest generation, filesystem utilities, HTTP download helpers and tarball extraction.

Crate Features

It is common to not need all the helpers in this crate. To avoid including unnecessary code and dependencies, this crate uses Cargo features to allow opt-out of certain modules if they're not needed.

The feature names line up with the modules in this crate. All features are enabled by default.

  • command - Enabled helpers to work with std::process::Command.
  • download - Enables helpers to download files over HTTP.
  • digest - Enables helpers to create checksums of files.
  • error - Enables helpers to achieve consistent error logging.
  • log - Enables helpers for logging.
  • buildpack_output - Enables helpers for user-facing buildpack output.
  • tar - Enables helpers for working with tarballs.
  • toml - Enables helpers for working with TOML data.
  • fs - Enables helpers for filesystem related tasks.
  • write - Enables std::io::Write proxy implementations.

Dependencies

~0.5–13MB
~133K SLoC