HomePhabricator

[cmake] Fetch Corrosion

Description

[cmake] Fetch Corrosion

Summary:
Fetching from CMake removes the need for installing Corrosion entirely.
Not only this makes it easier to build with chronik, but it also makes it easier
to maintain and bump the versions as it is now all in a single place.

Note that the Rust_CARGO_TARGET variable needs to be recomputed from the various
variables set by corrosion using this method:
https://corrosion-rs.github.io/corrosion/v0.4/usage.html#information-provided-by-corrosion

While I'm touching the file, I also fixed the dependency name for generating the bridge c++ files: chronik-lib-static is a name that is set internally by Corrosion and is not documented, but the property is actually documented and retrieving the name from here will be more reliable.

Depends on D15506.

Test Plan:

ninja

Run the Gitian Linux build.
Run the CI chronik-enabled builds.

Reviewers: #bitcoin_abc, bytesofman, PiRK

Reviewed By: #bitcoin_abc, bytesofman, PiRK

Subscribers: PiRK, bytesofman

Differential Revision: https://reviews.bitcoinabc.org/D15507

Details

Provenance
FabienAuthored on Feb 21 2024, 09:26
FabienPushed on Feb 22 2024, 08:48
Reviewer
Restricted Project
Differential Revision
D15507: [cmake] Fetch Corrosion
Parents
rABC652a38ab9844: [chronik] Bump corrosion to latest version
Branches
Unknown
Tags
Unknown