Releases: heroku/libcnb.rs
Releases · heroku/libcnb.rs
v0.13.0
The highlight of this release is the cargo libcnb package
changes to support compilation of both buildpacks and meta-buildpacks.
Changed
libcnb-cargo
: Thecargo libcnb package
command 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_name
to accept aBuildpackId
(#575)
Added
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
Buildpackage
struct. (#575)
- Serialization / deserialization of package.toml files supported with the
libcnb-package
- Added
read_buildpackage_data
,find_buildpack_dirs
,get_buildpack_target_dir
to 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_absolute
to support Buildpack dependency handling and packaging operations. (#575) - Added
buildpack_package::BuildpackPackage
,buildpack_package::read_buildpack_package
to support libcnb.rs-based Rust packages. (#575) - Added
dependency_graph::DependencyNode
,dependency_graph::create_dependency_graph
,dependency_graph::get_dependencies
to support dependency ordering and resolution in libcnb.rs-based Rust packages. (#575)
- Added
v0.12.0
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.
Changed
- libcnb.rs now targets Buildpack API 0.9. Buildpacks need to upgrade the
api
key to0.9
in theirbuildpack.toml
. (#567)Process
no longer supports thedirect
flag. All processes are nowdirect
. Processes that need to use bash can use bash explicitly in the command. (#567)Process::command
has 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 existingargs
field behaves slightly different now as its contents can now be overridden by the user. See the upstream CNB specification for details. (#567)
Env::get
now 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::cloned
call afterEnv::get
to get the old behaviour. In some cases, cloning might not be necessary, slightly improving the code that usesEnv::get
. (#565)
Added
v0.11.5
v0.11.4
v0.11.3
v0.11.2
Fixed
- libcnb-test:
TestContext::download_sbom_files
now checks the exit code of thepack sbom download
command it runs. (#520)
Changed
- libcnb: Drop the use of the
stacker
crate when recursively removing layer directories. (#517) - libcnb-cargo: Updated to Clap v4. (#511)
Added
- libherokubuildpack: Add
command
andwrite
modules for working withstd::process::Command
output streams. (#535)
v0.11.1
v0.11.0
Changed
- Bump Minimum Supported Rust Version (MSRV) to
1.64
. (#500) - Bump minimum external dependency versions. (#502)
Added
- Add new crate
libherokubuildpack
with common code that can be useful when implementing buildpacks with libcnb. Originally hosted in a separate, private, repository. Code fromlibherokubuildpack
might eventually find its way into libcnb.rs proper. At this point, consider it an incubator. (#495)
v0.10.0
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.
Changed
- libcnb.rs now targets Buildpack API 0.8. Buildpacks need to upgrade the
api
key to0.8
in theirbuildpack.toml
. (#489) - In accordance to the CNB specification
>=0.7
,BuildpackId
no longer permitssbom
as a buildpack id. (#489) - Replace builder style functions from
Launch
with a dedicatedLaunchBuilder
to be more consistent with other builders in the library. Additionally, all fields ofLaunch
can now be modified via the builder pattern. (#487) - Rename
paths
field inlaunch::Slice
topath_globs
and add docs to make it clearer that these strings are Go standard library globs. (#487) - Add explicit
DeleteLayerError
to provide more context when debugging layer handling problems. (#488)
Fixed
- Fix
BuildpackApi
to useu64
instead ofu32
for major and minor version parts. (#489) - Fix permission issues during layer handling when the layer contains read-only directories. (#488)
Added
- Add
BuildResultBuilder::build_sbom
,BuildResultBuilder::launch_sbom
andLayerResultBuilder::sbom
to enable buildpack authors to attach SBOM data for layers and launch. (#489) - Add
sbom::SbomFormat
, describing supported SBOM formats. (#489) - Add
Buildpack::sbom_formats
field. (#489) - Add support for setting a working directory for launch processes. (#489)
- Add
TestContext::download_sbom_files
to allow testing of SBOM logic. (#489)
Removed
- Remove support for legacy BOM. Remove
Launch::bom
,Build::bom
,bom::Bom
,bom::Entry
. (#489)
libcnb-test v0.6.0
- Overhaul the crate README/docs, to improve the learning/onboarding UX. (#478)
- Rename
TestRunner::run_test
toTestRunner::build
,TestConfig
toBuildConfig
andTestContext::run_test
toTestContext::rebuild
. (#470) - Add
TestContext::start_container
,TestContext::run_shell_command
andContainerConfig
. (#469) - Remove
TestContext::prepare_container
andPrepareContainerContext
. To start a container useTestContext::start_container
combined withContainerConfig
(or else the convenience functionTestContext::run_shell_command
) instead. (#469) - Fix missing logs when using
ContainerContext::logs_now
. (#471)