diff --git a/images/ci/Dockerfile.build b/images/ci/Dockerfile.build index 2071973a619f9456dcdc48e7eb72e8d76b2c340c..a707e86d0a68bfd3178579ba7f68e90ce6e5d9c4 100644 --- a/images/ci/Dockerfile.build +++ b/images/ci/Dockerfile.build @@ -28,9 +28,9 @@ ENV BLST_PORTABLE=yes # hadolint ignore=SC2046,DL4006 RUN opam install --yes \ - # We must tell Opam to assume external dependencies are installed because it is not able to - # correctly detect and/or install Cargo and Rust compiler packages using the system package - # manager. + # We must tell Opam to assume external dependencies are installed + # because it is not able to correctly detect and/or install Cargo + # and Rust compiler packages using the system package manager. --assume-depexts \ $(opam list --all --short | grep -v ocaml-option-) \ # Pin Tezt to its development version. diff --git a/images/ci/Dockerfile.prebuild b/images/ci/Dockerfile.prebuild index efaeb81af5cf87115bb77094f0cb3896bb9b1dcf..26e98fef53045230cfe83055e36cf53f36aaef2e 100644 --- a/images/ci/Dockerfile.prebuild +++ b/images/ci/Dockerfile.prebuild @@ -29,7 +29,6 @@ ARG TARGETARCH COPY --chown=tezos:tezos .gitconfig /home/tezos/ # Rust installer script -COPY --chown=tezos:tezos install-rust.sh /tmp/ COPY --chown=tezos:tezos scripts/install_opam_static.sh /tmp/ COPY --chown=tezos:tezos scripts/install_sccache_static.sh /tmp/ @@ -65,6 +64,7 @@ RUN apk update \ perl \ postgresql14-dev \ rsync \ + rustup \ tar \ unzip \ wget \ @@ -80,10 +80,6 @@ RUN apk update \ sqlite-static \ sqlite-dev -# Install Cargo and Rust (more information in the shell script) -RUN ./install-rust.sh \ - && rm -rf /tmp/install-rust.sh - ARG OPAM_VERSION ENV OPAM_VERSION=$OPAM_VERSION # Install opam @@ -96,6 +92,13 @@ RUN ./install_sccache_static.sh \ USER tezos WORKDIR /home/tezos +ARG RUST_VERSION +RUN rustup-init --default-toolchain ${RUST_VERSION} -y + +ENV PATH=/home/tezos/.cargo/bin:$PATH +RUN rustup target add x86_64-unknown-linux-musl && \ + rustup default ${RUST_VERSION} + # Create an opam-repository directory that is a clone of the public opam repository # filtered to only keep packages which we actually need. COPY --chown=tezos:tezos scripts/create_opam_repo.sh scripts/version.sh octez-deps.opam.locked release-tools-deps.opam.locked dream-httpaf.opam.locked dream.opam.locked cohttp.opam.locked cohttp-lwt.opam.locked cohttp-lwt-unix.opam.locked ./ diff --git a/images/create_ci_images.sh b/images/create_ci_images.sh index 4ecc5326587e53800fa43afebe8d8400dcbe9217..9cb229f54a209eae3d5442549659e1961077f154 100755 --- a/images/create_ci_images.sh +++ b/images/create_ci_images.sh @@ -207,6 +207,7 @@ build() { --build-arg BUILD_IMAGE="alpine:${alpine_version}" \ --build-arg OCAML_VERSION="${ocaml_version}" \ --build-arg OPAM_VERSION="${opam_version}" \ + --build-arg RUST_VERSION="${recommended_rust_version}" \ --build-arg TARGETARCH="${targetarch}" \ --build-arg NPM_REGISTRY_DOMAIN="${NPM_REGISTRY_DOMAIN:-}" \ --build-arg NPM_REGISTRY="${NPM_REGISTRY:-}" \ diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index 65826966578b83b51cfebd3ed6b22c57fdedafa9..1e17abd814f6ff293662e7ace2dc7400a63b47fb 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -512,7 +512,6 @@ let lib_rustzcash = [ S "targets"; S "liboctez_rustzcash_deps.a"; - S "dlloctez_rustzcash_deps.so"; ]; [ S "deps"; @@ -552,7 +551,7 @@ let octez_rust_deps, lib_wasmer_riscv = ]; [ S "rule"; - [S "targets"; S "liboctez_rust_deps.a"; S "dlloctez_rust_deps.so"]; + [S "targets"; S "liboctez_rust_deps.a"]; [ S "deps"; [S "file"; S "build.sh"]; diff --git a/src/rust_deps/dune b/src/rust_deps/dune index bea693fa87d72a0568de2bd8e1c29b066b0b5327..2fc07a4f00868bd2f6111bc517baab650b07d960 100644 --- a/src/rust_deps/dune +++ b/src/rust_deps/dune @@ -10,7 +10,7 @@ (dirs :standard .cargo (not target)) (rule - (targets liboctez_rust_deps.a dlloctez_rust_deps.so) + (targets liboctez_rust_deps.a) (deps (file build.sh) (file Cargo.toml) diff --git a/src/rustzcash_deps/dune b/src/rustzcash_deps/dune index 9c60b89c8e80e2c9473e01d91db427ecf969047c..ddddd69f0ac8ae06a6c99bfcea8d4370717dd271 100644 --- a/src/rustzcash_deps/dune +++ b/src/rustzcash_deps/dune @@ -10,7 +10,7 @@ (dirs :standard .cargo (not target)) (rule - (targets liboctez_rustzcash_deps.a dlloctez_rustzcash_deps.so) + (targets liboctez_rustzcash_deps.a) (deps (file build.sh) (file Cargo.toml)