Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ build --features=swift.use_global_module_cache
# Gate the references to androidndk behind a flag to support building on arm linux.
build:android --android_crosstool_top=@androidndk//:toolchain

# TODO(snowp): Remove this once the below issues are resolved.
# https://github.com/bazelbuild/rules_rust/issues/3564
# https://github.com/bazelbuild/rules_rust/issues/3627
build:ios --config=fake-nightly
build:ios --@rules_rust//rust/settings:experimental_use_allocator_libraries_with_mangled_symbols

build --@rules_rust//rust/settings:rustfmt.toml=//:rustfmt.toml
build --@rules_rust//rust/settings:clippy.toml=//:.clippy.toml

Expand Down Expand Up @@ -70,24 +76,23 @@ build:release-common --config=abort-panic
# Size optimizations, codegen-units=1 go along side LTO, which accounts for
# about 10% reduction; -z has a non-zero smaller impact (a few pp).
build:release-common --@rules_rust//rust/settings:extra_rustc_flag='-Ccodegen-units=1'
build:release-common --@rules_rust//rust/settings:extra_rustc_flag='-Copt-level=s'
build:release-common --@rules_rust//rust/settings:extra_rustc_flag='-Clto=fat'
# Without the next line, rules_rust will add -Clinker-plugin-lto which would be amazing
# but the ndk's lld won't support the output
build:release-common --@rules_rust//rust/settings:lto='manual'
build:release-common --@rules_rust//rust/settings:extra_rustc_flag='-Copt-level=z'

build:release-android --define android_strip_symbols=true
build:release-android --android_platforms=@rules_android//:armeabi-v7a,@rules_android//:arm64-v8a,@rules_android//:x86,@rules_android//:x86_64
build:release-android --config=release-common
build:release-android --copt=-flto=thin --linkopt=-flto=thin
build:release-android --config=android
build:release-android --@rules_rust//rust/settings:lto='fat'
build:release-android --linkopt=-Wl,--pack-dyn-relocs=android
# TODO(snowp): This should do better but requires a certain version of Android.
# Investigate what this is and track when we can use it.
# build:release-android --linkopt=-Wl,--use-android-relr-tags

# Custom iOS release configuration
build:force-xcode-version --ios_simulator_device="iPhone 15"
build:force-xcode-version --ios_simulator_version=18.2
build:force-xcode-version --xcode_version=16.2
build:release-ios --config=ios
build:release-ios --config=release-common --config=force-xcode-version
build:release-ios --features=swift.enable_library_evolution
build:release-ios --features=swift.emit_swiftinterface
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Check for workflow file changes
id: workflow_check
run: |
./ci/files_changed.sh .github/workflows/ios.yaml
./ci/files_changed.sh .github/workflows/ios.yaml MODULE.bazel MODULE.bazel.lock
continue-on-error: true
- name: Determine if tests should run
id: check_changes_separate
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- name: "Install dependencies"
run: ./ci/mac_ci_setup.sh
- name: Run iOS tests (tsan)
run: env -u ANDROID_NDK_HOME ./bazelw test $(./bazelw query 'kind(ios_unit_test, //test/platform/swift/unit_integration/core/...)') --test_tag_filters=macos_only --test_output=errors --config ci
run: env -u ANDROID_NDK_HOME ./bazelw test $(./bazelw query 'kind(ios_unit_test, //test/platform/swift/unit_integration/core/...)') --test_tag_filters=macos_only --test_output=errors --config ci --config ios
verify_ios:
runs-on: ubuntu-latest
needs: ["macos_tsan", "swift_hello_world"]
Expand Down
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ android_artifacts(
native_deps = select({
# When targeting an optimized build, use the stripped binary. The symbols are collected prior to stripping and exposed via capture_symbols below.
"//bazel/android:strip_symbols": [":capture.debug_info"],
"//conditions:default": ["//platform/jvm:capture"],
"//conditions:default": ["//platform/jvm:capture_shared"],
}),
proguard_rules = "//platform/jvm:proguard",
visibility = ["//visibility:public"],
)

android_debug_info(
name = "capture.debug_info",
dep = "//platform/jvm:capture",
dep = "//platform/jvm:capture_shared",
tags = ["manual"],
)

Expand Down
19 changes: 3 additions & 16 deletions Cargo.Bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 15 additions & 14 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module(name = "capture-sdk")
# Constants
####################

RUST_VERSION = "1.88.0"
RUST_VERSION = "1.90.0"

OKHTTP_VERSION = "4.12.0"

Expand Down Expand Up @@ -53,7 +53,7 @@ bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_kotlin", version = "2.1.9")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "protobuf", version = "29.3")
bazel_dep(name = "rules_rust", version = "0.62.0")
bazel_dep(name = "rules_rust", version = "0.65.0")
bazel_dep(name = "rules_shell", version = "0.4.0")

# Required by android_artifacts for pom_file, it's not in bazel central registry
Expand Down Expand Up @@ -288,18 +288,18 @@ rust.toolchain(
#
# tl;dr; run e.g. $ ./tools/rust_std_checksum.sh 1.82.0
sha256s = {
"rust-std-" + RUST_VERSION + "-aarch64-apple-ios-sim.tar.gz": "e9505b25f37f49d90f2edd31ea8d4d20362e8dfe48c036f49dc4e638abf90dc9",
"rust-std-" + RUST_VERSION + "-aarch64-apple-ios.tar.gz": "0072ccac226551ae06865d963c74e872b8d425f4afe6465036034656880b3f5a",
"rust-std-" + RUST_VERSION + "-x86_64-apple-ios.tar.gz": "98678a0c84760458dd971c548de495ed155d9f0b0fd59bb21df7d9e733fd97f7",
"rust-std-" + RUST_VERSION + "-aarch64-linux-android.tar.gz": "9d1408d9e5ec0fb02904f18b5543318c092488069eae79e1c3af60a1ae27124d",
"rust-std-" + RUST_VERSION + "-armv7-linux-androideabi.tar.gz": "48132028374a7ac64b07dc4f8c12c5ea6bdbf9cd400a3e622470d32c10500ced",
"rust-std-" + RUST_VERSION + "-i686-linux-android.tar.gz": "b22d731679d0ae2567d2a3bf1c2d519e5c237ef4466c1d475aed7313f0304549",
"rustc-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "539d09b27becd0c52e15f6551e3756aa5ce0fc14484a922731abd0341967eea8",
"cargo-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "b4c5c9ba40b62f3486f05133ae2a739d99d1ad05566d73ad6bc6370636e2de7a",
"llvm-tools-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "9c0487e42dce9b039dadfd855e7b6d690d669298250b7910ad58655fa8466a61",
"rust-std-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "f852990a4bb1a84cef74fb92d0c9715b453379c32af43a8b3b357cadcc78f542",
"clippy-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "ffbf7fabb4271b5dfbaf9e8de7001837cd67a46f89d9217dcbc8df91b9ff8794",
"rustfmt-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "b9658e85e2adfaa68c4b9610d14a6194d66aea3547e5af09d40616adc6c6427a",
"rust-std-" + RUST_VERSION + "-aarch64-apple-ios-sim.tar.gz": "7cfa5f18307d198da5e28fa9c7dc129cb8856131cf1121fed91a756c2a7b3580",
"rust-std-" + RUST_VERSION + "-aarch64-apple-ios.tar.gz": "596585ba45607c0487cec70ba1b9b3215ef6826de1bd59a44273b4f3f442f3b2",
"rust-std-" + RUST_VERSION + "-x86_64-apple-ios.tar.gz": "e0e42c0139ccd113f7b8c671071aa6c9999208a932847eefdcdc2b3ea8099524",
"rust-std-" + RUST_VERSION + "-aarch64-linux-android.tar.gz": "0094d52b27d0c3091000f9c439b683a205c15cbd713acafd1a8febee42ed448a",
"rust-std-" + RUST_VERSION + "-armv7-linux-androideabi.tar.gz": "1ce1491fd05ddd65436a130d0a84dc4230f542bef838c16c61375f94dcf1b727",
"rust-std-" + RUST_VERSION + "-i686-linux-android.tar.gz": "40c03f9fd057fdcb28223166ae22ebf667ae76727773fd3c33eeb1088ded9509",
"rustc-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "77e8d4c354aab89b2abcd4608d2cb7612a99000d8064491aeafbc325c757943a",
"cargo-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "a242bb8d88d4d1b621f33742d0c718ebb5a551b07d21240e8b8c31152dc29737",
"llvm-tools-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "d89589963e941955aeb65ce4e71f88322686f7e4d65f66a87a05c8b893a6cf78",
"rust-std-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "30d6e3008a288f779c90c92d867dcd4f05fd5107d7f3e69d4d37a5945878110a",
"clippy-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "323a3ebca03d5aa7dc8d8d54ac05963e08a1c4fb22066ef6b05ee5398e397b12",
"rustfmt-" + RUST_VERSION + "-aarch64-apple-darwin.tar.gz": "0fff92769fbe393468584232a30ae8e0ea01eb2242201122eea56593b30861ac",
},
urls = [
# NOTE: `urls` are technically mirrors so we want to make sure we always try our own first then the official ones.
Expand All @@ -313,6 +313,7 @@ rust.toolchain(
],
versions = [
RUST_VERSION,
"nightly/2025-10-02",
],
)
use_repo(rust, "rust_toolchains")
Expand Down
50 changes: 12 additions & 38 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading