From 4f538bdaaa105dc262beb6de1453996eae035ef7 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 14:11:51 +0200 Subject: [PATCH 01/14] [rust] Include flag in workflow to build SM in CI with debug info --- .github/workflows/build-selenium-manager.yml | 95 ++++++++++++++------ rust/Cargo.toml | 4 +- 2 files changed, 71 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-selenium-manager.yml b/.github/workflows/build-selenium-manager.yml index 92880db927845..d124be459c9da 100644 --- a/.github/workflows/build-selenium-manager.yml +++ b/.github/workflows/build-selenium-manager.yml @@ -1,13 +1,17 @@ name: Build selenium-manager -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + debug: + description: 'Include debug info' + required: false + type: boolean jobs: win32: name: "[Windows x32] Build selenium-manager" runs-on: windows-latest - env: - RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 @@ -17,16 +21,30 @@ jobs: rustup toolchain install stable-i686-pc-windows-msvc rustup default stable-i686-pc-windows-msvc rustc -vV - - name: "Build release" + - name: "Build release binary" + if: ${{ inputs.debug == false }} run: | cd rust cargo build --release - - name: "Upload binary" + - name: "Upload release binary" + if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_windows-x32 path: rust/target/release/selenium-manager.exe retention-days: 6 + - name: "Build debug binary" + if: ${{ inputs.debug == true }} + run: | + cd rust + cargo build --profile dev + - name: "Upload debug binary" + if: ${{ inputs.debug == true }} + uses: actions/upload-artifact@v3 + with: + name: selenium-manager_windows-x32-debug + path: rust/target/debug/selenium-manager.exe + retention-days: 6 linux64: name: "[Linux x64] Build selenium-manager" @@ -42,26 +60,38 @@ jobs: run: | cargo install cross --git https://github.com/cross-rs/cross cross -V - - name: "Build release" + - name: "Build release binary" + if: ${{ inputs.debug == false }} run: | cd rust cross build --target x86_64-unknown-linux-musl --release - - name: "Tar binary (to keep executable permission)" - run: | - cd rust/target/x86_64-unknown-linux-musl/release + cd target/x86_64-unknown-linux-musl/release tar -cvf ../../../../selenium-manager.tar selenium-manager - - name: "Upload binary" + - name: "Upload release binary" + if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_linux-x64 path: selenium-manager.tar retention-days: 6 + - name: "Build debug binary" + if: ${{ inputs.debug == true }} + run: | + cd rust + cross build --target x86_64-unknown-linux-musl --profile dev + cd target/x86_64-unknown-linux-musl/debug + tar -cvf ../../../../selenium-manager.tar selenium-manager + - name: "Upload debug binary" + if: ${{ inputs.debug == true }} + uses: actions/upload-artifact@v3 + with: + name: selenium-manager_linux-x64-debug + path: selenium-manager.tar + retention-days: 6 macos64: name: "[macOS x64/arm64] Build selenium-manager" runs-on: macos-latest - env: - RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 @@ -70,28 +100,39 @@ jobs: rustup update rustup target add aarch64-apple-darwin rustc -vV - - name: "Build x64" - run: | - cd rust - cargo build --release --target x86_64-apple-darwin - - name: "Build arm64" + - name: "Build release binary" + if: ${{ inputs.debug == false }} run: | cd rust - cargo build --release --target aarch64-apple-darwin - - name: "Build universal" - run: | - cd rust - lipo -create \ - -output target/selenium-manager \ + cargo build --target x86_64-apple-darwin --release + cargo build --target aarch64-apple-darwin --release + lipo -create -output target/selenium-manager \ target/aarch64-apple-darwin/release/selenium-manager \ target/x86_64-apple-darwin/release/selenium-manager - - name: "Tar binary (to keep executable permission)" - run: | - cd rust/target + cd target tar -cvf ../../selenium-manager.tar selenium-manager - - name: "Upload binary" + - name: "Upload release binary" + if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_macos-universal path: selenium-manager.tar retention-days: 6 + - name: "Build debug binary" + if: ${{ inputs.debug == true }} + run: | + cd rust + cargo build --target x86_64-apple-darwin --profile dev + cargo build --target aarch64-apple-darwin --profile dev + lipo -create -output target/selenium-manager \ + target/aarch64-apple-darwin/debug/selenium-manager \ + target/x86_64-apple-darwin/debug/selenium-manager + cd target + tar -cvf ../../selenium-manager.tar selenium-manager + - name: "Upload debug binary" + if: ${{ inputs.debug == true }} + uses: actions/upload-artifact@v3 + with: + name: selenium-manager_macos-universal-debug + path: selenium-manager.tar + retention-days: 6 \ No newline at end of file diff --git a/rust/Cargo.toml b/rust/Cargo.toml index f4352d8c22c84..657b8f98a9d49 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -44,4 +44,6 @@ opt-level = 'z' # Optimize for size lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic -strip = true # Strip symbols from binary* + +[profile.dev] +debug = true # Full debug info From 67404373b2dea6a9df8dbe142f78592ba30e0cce Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 17:48:14 +0200 Subject: [PATCH 02/14] [rust] Use cross to build binaries in Windows and macOS --- .github/workflows/build-selenium-manager.yml | 50 +++++++++++++++----- rust/Cargo.toml | 1 + rust/Cross.toml | 8 ++++ 3 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 rust/Cross.toml diff --git a/.github/workflows/build-selenium-manager.yml b/.github/workflows/build-selenium-manager.yml index d124be459c9da..e8dac120b35af 100644 --- a/.github/workflows/build-selenium-manager.yml +++ b/.github/workflows/build-selenium-manager.yml @@ -11,39 +11,48 @@ on: jobs: win32: name: "[Windows x32] Build selenium-manager" - runs-on: windows-latest + runs-on: ubuntu-latest steps: - name: "Checkout project" uses: actions/checkout@v4 - name: "Update Rust" run: | rustup update - rustup toolchain install stable-i686-pc-windows-msvc - rustup default stable-i686-pc-windows-msvc rustc -vV + - name: "Install cross" + run: | + cargo install cross --git https://github.com/cross-rs/cross + cross -V + - name: "Install cross toolchains" + run: | + git clone https://github.com/cross-rs/cross + cd cross + git submodule update --init --remote + cargo xtask configure-crosstool + cargo build-docker-image i686-pc-windows-msvc-cross --tag local - name: "Build release binary" if: ${{ inputs.debug == false }} run: | cd rust - cargo build --release + cross build --target i686-pc-windows-msvc --release - name: "Upload release binary" if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_windows-x32 - path: rust/target/release/selenium-manager.exe + path: rust/target/i686-pc-windows-msvc/release/selenium-manager.exe retention-days: 6 - name: "Build debug binary" if: ${{ inputs.debug == true }} run: | cd rust - cargo build --profile dev + cross build --target i686-pc-windows-msvc --profile dev - name: "Upload debug binary" if: ${{ inputs.debug == true }} uses: actions/upload-artifact@v3 with: name: selenium-manager_windows-x32-debug - path: rust/target/debug/selenium-manager.exe + path: rust/target/i686-pc-windows-msvc/debug/selenium-manager.exe retention-days: 6 linux64: @@ -91,21 +100,36 @@ jobs: macos64: name: "[macOS x64/arm64] Build selenium-manager" - runs-on: macos-latest + runs-on: ubuntu-latest steps: - name: "Checkout project" uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: "Update Rust" run: | rustup update - rustup target add aarch64-apple-darwin rustc -vV + - name: "Install cross" + run: | + cargo install cross --git https://github.com/cross-rs/cross + cross -V + - name: "Install cross toolchains" + run: | + git clone https://github.com/cross-rs/cross + cd cross + git submodule update --init --remote + cargo xtask configure-crosstool + cargo build-docker-image x86_64-apple-darwin-cross --tag local + cargo build-docker-image aarch64-apple-darwin-cross --tag local - name: "Build release binary" if: ${{ inputs.debug == false }} run: | cd rust - cargo build --target x86_64-apple-darwin --release - cargo build --target aarch64-apple-darwin --release + cross build --target x86_64-apple-darwin --release + cross build --target aarch64-apple-darwin --release lipo -create -output target/selenium-manager \ target/aarch64-apple-darwin/release/selenium-manager \ target/x86_64-apple-darwin/release/selenium-manager @@ -122,8 +146,8 @@ jobs: if: ${{ inputs.debug == true }} run: | cd rust - cargo build --target x86_64-apple-darwin --profile dev - cargo build --target aarch64-apple-darwin --profile dev + cross build --target x86_64-apple-darwin --profile dev + cross build --target aarch64-apple-darwin --profile dev lipo -create -output target/selenium-manager \ target/aarch64-apple-darwin/debug/selenium-manager \ target/x86_64-apple-darwin/debug/selenium-manager diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 657b8f98a9d49..48ae794852c3b 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -44,6 +44,7 @@ opt-level = 'z' # Optimize for size lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic +strip = true # Strip symbols from binary [profile.dev] debug = true # Full debug info diff --git a/rust/Cross.toml b/rust/Cross.toml new file mode 100644 index 0000000000000..63265069361e9 --- /dev/null +++ b/rust/Cross.toml @@ -0,0 +1,8 @@ +[target.i686-pc-windows-msvc] +image = "ghcr.io/cross-rs/i686-pc-windows-msvc-cross:local" + +[target.x86_64-apple-darwin] +image = "ghcr.io/cross-rs/x86_64-apple-darwin-cross:local" + +[target.aarch64-apple-darwin] +image = "ghcr.io/cross-rs/aarch64-apple-darwin-cross:local" From ca0f418c0ac2752fb04dd71a9b4e9d0ad7e03d67 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 20:30:29 +0200 Subject: [PATCH 03/14] Revert "[rust] Use cross to build binaries in Windows and macOS" This reverts commit 05bef2a4d2f50d109e3cdc5abf300ede0d2a935f. --- .github/workflows/build-selenium-manager.yml | 50 +++++--------------- rust/Cargo.toml | 1 - rust/Cross.toml | 8 ---- 3 files changed, 13 insertions(+), 46 deletions(-) delete mode 100644 rust/Cross.toml diff --git a/.github/workflows/build-selenium-manager.yml b/.github/workflows/build-selenium-manager.yml index e8dac120b35af..d124be459c9da 100644 --- a/.github/workflows/build-selenium-manager.yml +++ b/.github/workflows/build-selenium-manager.yml @@ -11,48 +11,39 @@ on: jobs: win32: name: "[Windows x32] Build selenium-manager" - runs-on: ubuntu-latest + runs-on: windows-latest steps: - name: "Checkout project" uses: actions/checkout@v4 - name: "Update Rust" run: | rustup update + rustup toolchain install stable-i686-pc-windows-msvc + rustup default stable-i686-pc-windows-msvc rustc -vV - - name: "Install cross" - run: | - cargo install cross --git https://github.com/cross-rs/cross - cross -V - - name: "Install cross toolchains" - run: | - git clone https://github.com/cross-rs/cross - cd cross - git submodule update --init --remote - cargo xtask configure-crosstool - cargo build-docker-image i686-pc-windows-msvc-cross --tag local - name: "Build release binary" if: ${{ inputs.debug == false }} run: | cd rust - cross build --target i686-pc-windows-msvc --release + cargo build --release - name: "Upload release binary" if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_windows-x32 - path: rust/target/i686-pc-windows-msvc/release/selenium-manager.exe + path: rust/target/release/selenium-manager.exe retention-days: 6 - name: "Build debug binary" if: ${{ inputs.debug == true }} run: | cd rust - cross build --target i686-pc-windows-msvc --profile dev + cargo build --profile dev - name: "Upload debug binary" if: ${{ inputs.debug == true }} uses: actions/upload-artifact@v3 with: name: selenium-manager_windows-x32-debug - path: rust/target/i686-pc-windows-msvc/debug/selenium-manager.exe + path: rust/target/debug/selenium-manager.exe retention-days: 6 linux64: @@ -100,36 +91,21 @@ jobs: macos64: name: "[macOS x64/arm64] Build selenium-manager" - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout project" uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - name: "Update Rust" run: | rustup update + rustup target add aarch64-apple-darwin rustc -vV - - name: "Install cross" - run: | - cargo install cross --git https://github.com/cross-rs/cross - cross -V - - name: "Install cross toolchains" - run: | - git clone https://github.com/cross-rs/cross - cd cross - git submodule update --init --remote - cargo xtask configure-crosstool - cargo build-docker-image x86_64-apple-darwin-cross --tag local - cargo build-docker-image aarch64-apple-darwin-cross --tag local - name: "Build release binary" if: ${{ inputs.debug == false }} run: | cd rust - cross build --target x86_64-apple-darwin --release - cross build --target aarch64-apple-darwin --release + cargo build --target x86_64-apple-darwin --release + cargo build --target aarch64-apple-darwin --release lipo -create -output target/selenium-manager \ target/aarch64-apple-darwin/release/selenium-manager \ target/x86_64-apple-darwin/release/selenium-manager @@ -146,8 +122,8 @@ jobs: if: ${{ inputs.debug == true }} run: | cd rust - cross build --target x86_64-apple-darwin --profile dev - cross build --target aarch64-apple-darwin --profile dev + cargo build --target x86_64-apple-darwin --profile dev + cargo build --target aarch64-apple-darwin --profile dev lipo -create -output target/selenium-manager \ target/aarch64-apple-darwin/debug/selenium-manager \ target/x86_64-apple-darwin/debug/selenium-manager diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 48ae794852c3b..657b8f98a9d49 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -44,7 +44,6 @@ opt-level = 'z' # Optimize for size lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic -strip = true # Strip symbols from binary [profile.dev] debug = true # Full debug info diff --git a/rust/Cross.toml b/rust/Cross.toml deleted file mode 100644 index 63265069361e9..0000000000000 --- a/rust/Cross.toml +++ /dev/null @@ -1,8 +0,0 @@ -[target.i686-pc-windows-msvc] -image = "ghcr.io/cross-rs/i686-pc-windows-msvc-cross:local" - -[target.x86_64-apple-darwin] -image = "ghcr.io/cross-rs/x86_64-apple-darwin-cross:local" - -[target.aarch64-apple-darwin] -image = "ghcr.io/cross-rs/aarch64-apple-darwin-cross:local" From 25a1231231b3a5ea37c864ddcb98fdf863308e06 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 20:31:51 +0200 Subject: [PATCH 04/14] [rust] Extend setup in dev profile --- rust/Cargo.toml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 657b8f98a9d49..16d4c67b893d6 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -44,6 +44,15 @@ opt-level = 'z' # Optimize for size lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic +strip = true # Strip symbols from binary [profile.dev] -debug = true # Full debug info +opt-level = 0 +debug = true +debug-assertions = true +overflow-checks = true +lto = false +panic = 'unwind' +incremental = true +codegen-units = 256 +rpath = false From 144daacf9f4467bbb9b7785400fcc1d22ea29200 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 21:09:26 +0200 Subject: [PATCH 05/14] [rust] Simplify dev profile --- rust/Cargo.toml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 16d4c67b893d6..48ae794852c3b 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -47,12 +47,4 @@ panic = 'abort' # Abort on panic strip = true # Strip symbols from binary [profile.dev] -opt-level = 0 -debug = true -debug-assertions = true -overflow-checks = true -lto = false -panic = 'unwind' -incremental = true -codegen-units = 256 -rpath = false +debug = true # Full debug info From 8f92a80bf586d8d0abc888c5e0208c3710efa648 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 21:46:12 +0200 Subject: [PATCH 06/14] [rust] Remove dev profile --- rust/Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 48ae794852c3b..756d79fc74885 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -45,6 +45,3 @@ lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic strip = true # Strip symbols from binary - -[profile.dev] -debug = true # Full debug info From ccf38ee22232fa423a1aa32761fa9f859d6204c4 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 22:03:20 +0200 Subject: [PATCH 07/14] [rust] Include debug and split-debuginfo in dev profile --- rust/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 756d79fc74885..d84ad789e9374 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -45,3 +45,7 @@ lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic strip = true # Strip symbols from binary + +[profile.dev] +debug = true # Full debug info +split-debuginfo = 'off' # Debug info in the final artifact \ No newline at end of file From 951874189eda738d2ef53c3c486e4eadbe5e32c1 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Thu, 19 Oct 2023 22:11:42 +0200 Subject: [PATCH 08/14] [rust] Change windows target to stable-i686-pc-windows-gnu --- .github/workflows/build-selenium-manager.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-selenium-manager.yml b/.github/workflows/build-selenium-manager.yml index d124be459c9da..401bfd4982b60 100644 --- a/.github/workflows/build-selenium-manager.yml +++ b/.github/workflows/build-selenium-manager.yml @@ -18,8 +18,8 @@ jobs: - name: "Update Rust" run: | rustup update - rustup toolchain install stable-i686-pc-windows-msvc - rustup default stable-i686-pc-windows-msvc + rustup toolchain install stable-i686-pc-windows-gnu + rustup default stable-i686-pc-windows-gnu rustc -vV - name: "Build release binary" if: ${{ inputs.debug == false }} From 1928a789b04fa4d1bbb018a2af928b519dd6810b Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Fri, 20 Oct 2023 09:47:45 +0200 Subject: [PATCH 09/14] [rust] Restore rustflags in win32 and macos64 --- .github/workflows/build-selenium-manager.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-selenium-manager.yml b/.github/workflows/build-selenium-manager.yml index 401bfd4982b60..1acfddaf7c5b9 100644 --- a/.github/workflows/build-selenium-manager.yml +++ b/.github/workflows/build-selenium-manager.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: debug: - description: 'Include debug info' + description: 'Include debug symbols in binaries' required: false type: boolean @@ -12,6 +12,8 @@ jobs: win32: name: "[Windows x32] Build selenium-manager" runs-on: windows-latest + env: + RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 @@ -92,6 +94,8 @@ jobs: macos64: name: "[macOS x64/arm64] Build selenium-manager" runs-on: macos-latest + env: + RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 From 2b4a7599a607f89c543d00bcf8ceac7e88c612dc Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Fri, 20 Oct 2023 10:18:38 +0200 Subject: [PATCH 10/14] [rust] Remove rustflags --- .github/workflows/build-selenium-manager.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build-selenium-manager.yml b/.github/workflows/build-selenium-manager.yml index 1acfddaf7c5b9..1174bdebf69c4 100644 --- a/.github/workflows/build-selenium-manager.yml +++ b/.github/workflows/build-selenium-manager.yml @@ -12,8 +12,6 @@ jobs: win32: name: "[Windows x32] Build selenium-manager" runs-on: windows-latest - env: - RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 @@ -94,8 +92,6 @@ jobs: macos64: name: "[macOS x64/arm64] Build selenium-manager" runs-on: macos-latest - env: - RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 From 28707a6e7a1018e5db6b6e77b5e9eff78e749869 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Fri, 20 Oct 2023 10:19:09 +0200 Subject: [PATCH 11/14] [rust] Remove dev profile --- rust/Cargo.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index d84ad789e9374..756d79fc74885 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -45,7 +45,3 @@ lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic strip = true # Strip symbols from binary - -[profile.dev] -debug = true # Full debug info -split-debuginfo = 'off' # Debug info in the final artifact \ No newline at end of file From d668cd5e6e2d1fcbdfe559c09d2319dbf00d0bdf Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Fri, 20 Oct 2023 10:56:10 +0200 Subject: [PATCH 12/14] [rust] Include full dev profile --- rust/Cargo.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 756d79fc74885..12a889e6309c5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -45,3 +45,15 @@ lto = true # Enable Link Time Optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic strip = true # Strip symbols from binary + +[profile.dev] +opt-level = 0 +debug = true +split-debuginfo = 'off' +debug-assertions = true +overflow-checks = true +lto = false +panic = 'unwind' +incremental = true +codegen-units = 256 +rpath = false From 315eb3916cabcad4378157e4062c7e71b80e21e6 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Fri, 20 Oct 2023 11:06:44 +0200 Subject: [PATCH 13/14] [rust] Restore dev profile --- rust/Cargo.toml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 12a889e6309c5..f68f8b88a555f 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -47,13 +47,5 @@ panic = 'abort' # Abort on panic strip = true # Strip symbols from binary [profile.dev] -opt-level = 0 -debug = true -split-debuginfo = 'off' -debug-assertions = true -overflow-checks = true -lto = false -panic = 'unwind' -incremental = true -codegen-units = 256 -rpath = false +debug = true # Full debug info +split-debuginfo = 'off' # Debug info in the final artifact From 59c4ad6dfa207ef36c833dffca2148b58083f56c Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Fri, 20 Oct 2023 11:43:07 +0200 Subject: [PATCH 14/14] [rust] Update Bazel lock file --- rust/Cargo.Bazel.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Cargo.Bazel.lock b/rust/Cargo.Bazel.lock index 3ac4f5e552798..4d779e35aa4fc 100644 --- a/rust/Cargo.Bazel.lock +++ b/rust/Cargo.Bazel.lock @@ -1,5 +1,5 @@ { - "checksum": "baecbb6398eb38a71932eda885dd1343599c233b6c40d4e003fc35e853c53526", + "checksum": "a2e504e4740ef108e28e23990c45d6626cdcbedd415eaf4ab19d66855559e726", "crates": { "addr2line 0.19.0": { "name": "addr2line",