diff --git a/.gitlab-ci/test.yml b/.gitlab-ci/test.yml index 81e844c6..28d2aecf 100644 --- a/.gitlab-ci/test.yml +++ b/.gitlab-ci/test.yml @@ -59,6 +59,8 @@ build-docs: # We want to use the nightly toolchain inside the build terminal. - sed -i 's|"org.freedesktop.Sdk.Extension.rust-stable"|"org.freedesktop.Sdk.Extension.rust-nightly"|g' ${MANIFEST_PATH} - sed -i 's|/rust-stable/bin|/rust-nightly/extra/sdk/rust-nightly/bin|g' ${MANIFEST_PATH} + # Do not use the mold linker because it doesn't work with the rust-nightly extension at the moment + - sed -i 's|-C link-arg=-fuse-ld=mold||g' ${MANIFEST_PATH} - flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH} - echo "ninja src/doc" | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} - tar --auto-compress --create --file "${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-docs.tar.gz" --directory ".flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/cargo-target/doc" . diff --git a/.gitlab-ci/utils.yml b/.gitlab-ci/utils.yml index 7881311a..7bbfea5e 100644 --- a/.gitlab-ci/utils.yml +++ b/.gitlab-ci/utils.yml @@ -18,17 +18,12 @@ # Update the Flatpak manifest to use the latest stable GNOME runtime and use the corresponding # container image. # -# To get a list of available GNOME and LLVM versions, see: +# To get a list of available GNOME versions, see: # https://gitlab.gnome.org/GNOME/gnome-runtime-images/-/blob/master/.gitlab-ci.yml .stable_runtime: image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-${GNOME_STABLE_VERSION}' variables: GNOME_STABLE_VERSION: "49" - FREEDESKTOP_RUNTIME_BRANCH: "25.08" - LLVM_NIGHTLY_VERSION: "20" - LLVM_STABLE_VERSION: "20" before_script: # We want to use the latest stable GNOME runtime instead of the nightly runtime. - sed -i "s|master|${GNOME_STABLE_VERSION}|g" ${MANIFEST_PATH} - # We want to use the latest LLVM extension for the stable runtime. - - sed -i "s|llvm${LLVM_NIGHTLY_VERSION}|llvm${LLVM_STABLE_VERSION}|g" ${MANIFEST_PATH} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6036db95..946cc6b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,16 +22,17 @@ can also provide general help about using Rust in GNOME. ### Prerequisites -Fractal is written in Rust, so you will need to have at least Rust 1.80 and Cargo available on your -system. You will also need to install the Rust nightly toolchain to be able to run our +Fractal is written in Rust, so you will need to have at least Rust (the minimum required version is +available in the `Cargo.toml` file as `package.rust-version`) and Cargo available on your system. +You will also need to install the Rust nightly toolchain to be able to run our [pre-commit hook](#pre-commit), which can be done with: ```sh rustup toolchain install nightly ``` -If you're building Fractal with Flatpak (via GNOME Builder or the command line), you will need to -manually add the necessary remotes and install the required freedesktop.org extensions: +If you are building Fractal with Flatpak (via GNOME Builder or the command line), you will need to +manually add the necessary remotes and install the Rust freedesktop.org extension: ```sh # Add Flathub and the gnome-nightly repo @@ -43,9 +44,6 @@ flatpak install --user gnome-nightly org.gnome.Sdk//master org.gnome.Platform//m # Install the required rust-stable extension from Flathub flatpak install --user flathub org.freedesktop.Sdk.Extension.rust-stable//25.08 - -# Install the required llvm extension from Flathub -flatpak install --user flathub org.freedesktop.Sdk.Extension.llvm20//25.08 ``` If you are building the flatpak manually you will also need flatpak-builder on your system, or the diff --git a/build-aux/org.gnome.Fractal.Devel.json b/build-aux/org.gnome.Fractal.Devel.json index 5809dd0a..f1a39df3 100644 --- a/build-aux/org.gnome.Fractal.Devel.json +++ b/build-aux/org.gnome.Fractal.Devel.json @@ -4,8 +4,7 @@ "runtime-version": "master", "sdk": "org.gnome.Sdk", "sdk-extensions": [ - "org.freedesktop.Sdk.Extension.rust-stable", - "org.freedesktop.Sdk.Extension.llvm20" + "org.freedesktop.Sdk.Extension.rust-stable" ], "command": "fractal", "finish-args": [ @@ -20,13 +19,9 @@ "--env=RUST_BACKTRACE=1" ], "build-options": { - "append-ld-library-path": "/usr/lib/sdk/llvm20/lib", - "append-path": "/usr/lib/sdk/llvm20/bin:/usr/lib/sdk/rust-stable/bin", + "append-path": "/usr/lib/sdk/rust-stable/bin", "env": { - "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER": "clang", - "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C force-frame-pointers=yes -C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold --cfg=ruma_identifiers_storage=\"Arc\"", - "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER": "clang", - "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS": "-C force-frame-pointers=yes -C link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold --cfg=ruma_identifiers_storage=\"Arc\"" + "RUSTFLAGS": "-C link-arg=-fuse-ld=mold --cfg=ruma_identifiers_storage=\"Arc\"" }, "build-args": [ "--share=network"