This is the new, unified, changelog that contains changes from across all libcnb.rs crates. Before version 0.10.0,
separate changelogs for each crate were used. If you need to refer to these old changelogs, find them named
HISTORICAL_CHANGELOG.md in their respective crate directories.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.31.0 - 2026-07-01
libcnb:- Updated
opentelemetry,opentelemetry_sdkandopentelemetry-protofrom0.31to0.32, andtracing-opentelemetryfrom0.32to0.33. (#1003)
- Updated
0.30.4 - 2026-04-13
libcnb-test:- Added
assert_matches!macro for asserting that expressions match specific patterns, with optional guards. (#996)
- Added
0.30.3 - 2026-03-02
- Updated
tomlcrate from0.9.xto1.x. (#986)
0.30.2 - 2025-11-13
libcnb:- Ensure instrumentation covers
buildpack.on_error()functionality (#974)
- Ensure instrumentation covers
0.30.1 - 2025-11-04
libcnb:- Added
failedfield to the metadata of thelibcnb-detectandlibcnb-buildinstrumentation spans (#970)
- Added
0.30.0 - 2025-10-02
libcnb:- Updated OpenTelemetry dependencies from 0.30 to 0.31 (#964)
- Updated
opentelemetryfrom 0.30 to 0.31 - Updated
opentelemetry_sdkfrom 0.30 to 0.31 - Updated
opentelemetry-protofrom 0.30 to 0.31 - Updated
tracing-opentelemetryfrom 0.31 to 0.32
- Updated
- Updated OpenTelemetry dependencies from 0.30 to 0.31 (#964)
0.29.3 - 2025-09-29
libherokubuildpack:download::download_filenow returns aDownloadErrorfor erroneous HTTP status codes again. The behaviour unintentionally changed in0.29.2. (#961)
0.29.2 - 2025-09-26
-
libcnb:- Updated OpenTelemetry dependencies from 0.28.0 to 0.30.0 (#955)
- Updated
opentelemetryfrom 0.28.0 to 0.30.0 - Updated
opentelemetry_sdkfrom 0.28.0 to 0.30.0 - Updated
opentelemetry-protofrom 0.28.0 to 0.30.0 - Updated
tracing-opentelemetryfrom 0.29 to 0.31
- Updated
- Updated OpenTelemetry dependencies from 0.28.0 to 0.30.0 (#955)
-
libherokubuildpack:download::download_filenow uses the operating system's certificate facilities when verifying certificates. (#959)
0.29.1 - 2025-08-01
libcnb:- Order of automatically applied environment variables by libcnb, such as
PATH=<layer>/bin, now matches the upstream CNB lifecycle. (#938)
- Order of automatically applied environment variables by libcnb, such as
0.29.0 - 2025-05-02
libcnb-cargo- The default for the
--targetargument ofcargo libcnb packagewill now be based on an architecture that matches the host machine instead ofx86_64-unknown-linux-musl. (#922)
- The default for the
0.28.1 - 2025-03-25
libcnb:- OTLP File Exports are now correctly newline-separated. (#926)
libcnb-package:- The
cargo buildcommand used when packing the buildpack is now run using--lockedwhen theCIenv var is set. (#925)
- The
0.28.0 - 2025-03-03
libcnb:- The
tracingcrate is now setup for OTLP File Exports. Buildpacks usingtracingwill inherit tracing context fromlibcnb.rs. (#918)
- The
libcnb:- Tracing spans, events, and errors from libcnb.rs are now generated via the
tracinglibrary, and tracing data output has changed. (#918)
- Tracing spans, events, and errors from libcnb.rs are now generated via the
0.27.0 - 2025-02-27
- Raised Minimum Supported Rust Version (MSRV) to
1.85. (#913) - Updated to Rust 2024 edition. (#913)
libcnb:- Implemented custom OTLP File Exporter instead of
opentelemetry-stdoutand updatedopentelemetrylibraries to0.28. (#909)
- Implemented custom OTLP File Exporter instead of
0.26.1 - 2024-12-10
libherokubuildpack:- Fixed
log_header,log_errorandlog_warningto correctly reset the ANSI colour styles at the end of each line. (#890)
- Fixed
0.26.0 - 2024-11-18
libherokubuildpack:- Removed
buildpack_outputmodule. This functionality from (#721) was experimental. The API was not stable and it is being removed. A similar API is available at bullet_stream. (#852)
- Removed
0.25.0 - 2024-10-23
libcnb-test:- Added
ContainerConfig::bind_mountto support mounting a host machine file or directory into a container. (#871)
- Added
0.24.0 - 2024-10-17
libherokubuildpack:- Added
inventorymodule. (#861)
- Added
0.23.0 - 2024-08-28
libcnb-test:pack buildis now run with--trust-extra-buildpacksto force the builder to be trusted after upstream changes in Pack CLI. Pack CLI v0.35.1+ is now required to uselibcnb-test. (#855)
0.22.0 - 2024-06-18
libcnb:- A new API for working with layers has been added. See the
BuildContext::cached_layerandBuildContext::uncached_layerdocs for examples of how to use this API. (#814)
- A new API for working with layers has been added. See the
libcnb:
libcnb-data:- The working directory for launch processes specifying a
WorkingDirectory::Directoryvalue is now respected. (#831)
- The working directory for launch processes specifying a
0.21.0 - 2024-04-30
libcnb:Targetnow implementsCloneandDebug. (#821)
libcnb-test- Added the macro
assert_contains_match!for testing if a value contains a regular expression match. - Added the macro
assert_not_contains_match!for testing if a value does not contain a regular expression match.
- Added the macro
libcnb:
0.20.0 - 2024-04-12
libcnb:- Made
Target(the type ofDetectContext::targetandBuildContext::target) public. (#815)
- Made
libcnb:WriteLayerErrorchanged to contain more specific error enums instead of generic ones. (#786)
libcnb-data:- Renamed
TargettoBuildpackTargetto disambiguate it from the newlibcnb::Target. (#815)
- Renamed
0.19.0 - 2024-02-23
libcnb-data:- Reintroduced support for deserializing
[[stacks]]inbuildpack.toml. (#789)
- Reintroduced support for deserializing
libherokubuildpack:- Added
buildpack_outputmodule. This will help buildpack authors provide consistent and delightful output to their buildpack users (#721)
- Added
0.18.0 - 2024-02-12
- Now targets Buildpack API 0.10. Buildpacks need to upgrade the
apikey to0.10in theirbuildpack.toml. (#773) - Improved the consistency of cross-compilation assistance provided across all supported
target_tripleand host OS/architecture combinations. #769 - Added cross-compilation assistance for
aarch64-unknown-linux-musl(on macOS and ARM64 Linux) andx86_64-unknown-linux-musl(on ARM64 Linux). #769 - Raised Minimum Supported Rust Version (MSRV) to
1.76. (#774) libcnb:- Changed
Layerinterface from&selfto&mut self. (#669)
- Changed
libherokubuildpack:MappedWrite::unwrapfor getting the wrappedWriteback out. (#765)
- Types, errors, macros and functions related to stacks. The concept of stacks has been removed from the CNB spec. Use targets instead. (#773)
0.17.0 - 2023-12-06
libcnb:- An optional
tracefeature has been added that emits OpenTelemetry tracing data to a File Export. (#723)
- An optional
0.16.0 - 2023-11-17
- Raised Minimum Supported Rust Version (MSRV) to
1.74. (#747) - Improved the consistency of all user-facing libcnb.rs error message wordings. (#722)
- The assistance error message shown when the necessary cross-compilation tools are not found now also includes the
rustup target addstep. (#729) - Updated the documentation for
TestRunner::buildandTestContext::start_containerto mention when Docker resource teardown occurs. (#743)
libcnb-test:- Fixed incorrect error messages being shown for buildpack compilation/packaging failures. (#720)
- The Docker volumes created by Pack for the build and launch layer caches are now cleaned up after each test. (#741)
- The Docker image cleanup process no longer makes duplicate attempts to remove images when using
TestContext::rebuild. (#741) - Test failures due to the Docker daemon not being installed or started no longer cause a non-unwinding panic abort with noisy traceback. (#741)
- Containers created by
TestContext::start_containerare now correctly cleaned up if the container failed to start. (#742)
0.15.0 - 2023-09-25
libcnb:LayerTypesnow implementsCopyandClone. (#670).
libcnb-data:ExecDProgramOutputKey,ProcessType,LayerName,BuildpackIdandStackIdnow implementOrdandPartialOrd. (#658)- Added
generic::GenericMetadataas a generic metadata type. Also makes it the default forBuildpackDescriptor,SingleBuildpackDescriptor,CompositeBuildpackDescriptorandLayerContentMetadata. (#664)
libcnb-test:- Added the
BuildpackReference::WorkspaceBuildpackenum variant. This allows for the testing of any libcnb.rs or composite buildpack in the Cargo workspace, instead of only the buildpack of the current crate. Note: The testing of composite buildpacks requirespackCLI version>=0.30. (#666)
- Added the
libcnb-data:- Renamed the
buildpackagemodule topackage_descriptor, and theBuildpackage*types within it toPackageDescriptor*. (#656) - Renamed multiple types to match the new composite vs component buildpack upstream terminology. Renamed
SingleBuildpackDescriptortoComponentBuildpackDescriptor,MetaBuildpackDescriptortoCompositeBuildpackDescriptorandBuildpackDescriptor::{Single,Meta}toBuildpackDescriptor::{Component,Composite}. (#682)
- Renamed the
libcnb-cargo:libcnb-test:- Renamed
BuildpackReference::CratetoBuildpackReference::CurrentCrate. (#666)
- Renamed
0.14.0 - 2023-08-18
libcnb-package: Added cross-compilation assistance for Linuxaarch64-unknown-linux-musl. (#577)libcnb-cargo: Added--package-dircommand line option to control where packaged buildpacks are written. (#583)libcnb-test:
libcnb-cargo: Moved the default location for packaged buildpacks from Cargo'starget/directory topackaged/in the Cargo workspace root. This simplifies the path and stops modification of thetarget/directory which previously might have caching implications when other tools didn't expect non-Cargo output in that directory. Users that implicitly rely on the output directory need to adapt. The output ofcargo libcnb packagewill refer to the new locations. (#583)libcnb-package:libcnb-test:ContainerContext::address_for_portwill now panic for all failure modes rather than just some, and so now returnsSocketAddrdirectly instead ofOption<SocketAddr>. This reduces test boilerplate due to the caller no longer needing to.unwrap()and improves debugging UX when containers crash after startup. (#605 and #636)- Docker commands are now run using the Docker CLI instead of Bollard and the Docker daemon API. (#620)
ContainerConfig::entrypointnow accepts a String rather than a vector of strings. Any arguments to the entrypoint should be moved toContainerConfig::command. (#620)- Removed
TestRunner::newsince its only purpose was for advanced configuration that's no longer applicable. UseTestRunner::defaultinstead. (#620) - Removed
stdout_rawandstderr_rawfromLogOutput. (#607) - Improved wording of panic error messages. (#619 and #620)
libherokubuildpack: Changed theflate2decompression backend fromminiz_oxidetozlib. (#593)
libcnb-test:TestContext::run_shell_commandandContainerContext::shell_execnow validate the exit code of the spawned commands and panic if they are non-zero. (#620)ContainerContext::expose_portnow only exposes the port to localhost. (#610)- If a test with an expected result of
PackResult::Failureunexpectedly succeeds, the built app image is now correctly cleaned up. (#625)
0.13.0 - 2023-06-21
The highlight of this release is the cargo libcnb package changes to support compilation of both buildpacks and meta-buildpacks.
libcnb-cargo: Thecargo libcnb packagecommand now supports compiling buildpacks and meta-buildpacks (#575):- When used in a buildpack directory it will compile only that buildpack.
- When used in a workspace directory it will compile all buildpacks found in subdirectories.
libcnb-package: Changeddefault_buildpack_directory_nameto accept aBuildpackId(#575)
libcnb-cargo- Buildpacks can reference other buildpacks within a workspace by using
uri = "libcnb:{buildpack_id}"as a dependency entry in the buildpack's package.toml file. (#575)
- Buildpacks can reference other buildpacks within a workspace by using
libcnb-data- Serialization / deserialization of package.toml files supported with the
Buildpackagestruct. (#575)
- Serialization / deserialization of package.toml files supported with the
libcnb-package- Added
read_buildpackage_data,find_buildpack_dirs,get_buildpack_target_dirto support packaging operations. (#575) - Added
buildpack_dependency::BuildpackDependency,buildpack_dependency::get_local_buildpackage_dependencies,buildpack_dependency::rewrite_buildpackage_local_dependencies,buildpack_dependency::rewrite_buildpackage_relative_path_dependencies_to_absoluteto support Buildpack dependency handling and packaging operations. (#575) - Added
buildpack_package::BuildpackPackage,buildpack_package::read_buildpack_packageto support libcnb.rs-based Rust packages. (#575) - Added
dependency_graph::DependencyNode,dependency_graph::create_dependency_graph,dependency_graph::get_dependenciesto support dependency ordering and resolution in libcnb.rs-based Rust packages. (#575)
- Added
0.12.0 - 2023-04-28
Highlight of this release is the bump to Buildpack API 0.9. This release contains breaking changes, please refer to the items below for migration advice.
- libcnb.rs now targets Buildpack API 0.9. Buildpacks need to upgrade the
apikey to0.9in theirbuildpack.toml. (#567)Processno longer supports thedirectflag. All processes are nowdirect. Processes that need to use bash can use bash explicitly in the command. (#567)Process::commandhas been changed to a sequence of values where the first one is the executable and any additional values are arguments to the executable. The already existingargsfield behaves slightly different now as its contents can now be overridden by the user. See the upstream CNB specification for details. (#567)
Env::getnow returnsOption<&OsString>instead ofOption<OsString>. This is more in line with expectations users have when dealing with a collection type. This is a breaking change, compile errors can be fixed by adding aOption::clonedcall afterEnv::getto get the old behaviour. In some cases, cloning might not be necessary, slightly improving the code that usesEnv::get. (#565)
Env::get_string_lossyas a convenience method to work with environment variables directly. Getting a value out of anEnvand treating its contents as unicode is a common case. Using this new method can simplify buildpack code. (#565)Cloneimplementation forlibcnb::layer_env::Scope. (#566)
0.11.5 - 2023-02-07
- Update
tomlto0.7.1. If your buildpack interacts with TOML data directly, you probably want to bump thetomlversion in your buildpack as well. (#556)
0.11.4 - 2023-01-11
- libcnb-data: Store struct now supports
clone()anddefault(). (#547)
0.11.3 - 2023-01-09
- libcnb: Add
storefield toBuildContext, exposing the contents ofstore.tomlif present. (#543)
0.11.2 - 2022-12-15
- libcnb-test:
TestContext::download_sbom_filesnow checks the exit code of thepack sbom downloadcommand it runs. (#520)
- libcnb: Drop the use of the
stackercrate when recursively removing layer directories. (#517) - libcnb-cargo: Updated to Clap v4. (#511)
- libherokubuildpack: Add
commandandwritemodules for working withstd::process::Commandoutput streams. (#535)
0.11.1 - 2022-09-29
- All crates now properly include the
LICENSEfile. (#506) - Fix
libcnbreadme file metadata which prevented vendoringlibcnbviacargo vendor. (#506)
- Improve the
libherokubuildpackroot module rustdocs. (#503)
0.11.0 - 2022-09-23
- Bump Minimum Supported Rust Version (MSRV) to
1.64. (#500) - Bump minimum external dependency versions. (#502)
- Add new crate
libherokubuildpackwith common code that can be useful when implementing buildpacks with libcnb. Originally hosted in a separate, private, repository. Code fromlibherokubuildpackmight eventually find its way into libcnb.rs proper. At this point, consider it an incubator. (#495)
0.10.0 - 2022-08-31
Highlight of this release is the bump to Buildpack API 0.8 which brings support for SBOM to libcnb.rs. This is also the first release where all libcnb.rs crates are released at the same time and with the same version number. See the changelog below for other changes.
- libcnb.rs now targets Buildpack API 0.8. Buildpacks need to upgrade the
apikey to0.8in theirbuildpack.toml. (#489) - In accordance to the CNB specification
>=0.7,BuildpackIdno longer permitssbomas a buildpack id. (#489) - Replace builder style functions from
Launchwith a dedicatedLaunchBuilderto be more consistent with other builders in the library. Additionally, all fields ofLaunchcan now be modified via the builder pattern. (#487) - Rename
pathsfield inlaunch::Slicetopath_globsand add docs to make it clearer that these strings are Go standard library globs. (#487) - Add explicit
DeleteLayerErrorto provide more context when debugging layer handling problems. (#488)
- Fix
BuildpackApito useu64instead ofu32for major and minor version parts. (#489) - Fix permission issues during layer handling when the layer contains read-only directories. (#488)
- Add
BuildResultBuilder::build_sbom,BuildResultBuilder::launch_sbomandLayerResultBuilder::sbomto enable buildpack authors to attach SBOM data for layers and launch. (#489) - Add
sbom::SbomFormat, describing supported SBOM formats. (#489) - Add
Buildpack::sbom_formatsfield. (#489) - Add support for setting a working directory for launch processes. (#489)
- Add
TestContext::download_sbom_filesto allow testing of SBOM logic. (#489)
- Remove support for legacy BOM. Remove
Launch::bom,Build::bom,bom::Bom,bom::Entry. (#489)