[go: up one dir, main page]

Deps: Build layer 1 binaries against rustzcash only

rust_deps was introduced to fix a real issue: avoid duplicated symbols of the Rust standard library. Unfortunately, it did so by putting every Rust dependency we have in a single foreign archive. In practice, it means building every Rust dependency when building any binary.

An infamous byproduct of this is Wasmer being a direct dependency of basically everything in our git repository, even though it is only useful for Layer 2 daemons like the EVM node and the Smart Rollup node.

In practice, all if not most our binaries only depends on rustzcash. As a consequence, we introduce rustzcash_deps as an alternative foreign archive binaries can be linked against. This enable building the octez-node without having to build the rust_deps. Another example: RISC-V MRs will no longer have an impact on the octez-node.

For some reasons, the DAL and DAC nodes still requires to be linked against octez_rust_deps. It is not clear why, and should be investigated in a follow-up.

(To be clear: this should only have an impact on build time, not the size of the resulting binary. As far as we can tell, OCaml already does a pretty good job in eliminating dead code from foreign archives.

Manually testing the MR

Check rust_deps does no longer appear in _build/default/src when you build the octez-node.

; dune clean
; make octez-node
; ls _build/default/src

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Thomas Letan

Merge request reports

Loading