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
11 changes: 11 additions & 0 deletions cinterop-c/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ build:release --compilation_mode=opt --strip=always

build:macos_arm64 --platforms=@build_bazel_apple_support//platforms:macos_arm64 --apple_platform_type=macos
build:macos_x64 --platforms=@build_bazel_apple_support//platforms:macos_x86_64 --apple_platform_type=macos

build:ios_arm64 --platforms=@build_bazel_apple_support//platforms:ios_arm64 --apple_platform_type=ios
build:ios_simulator_arm64 --platforms=@build_bazel_apple_support//platforms:ios_sim_arm64 --apple_platform_type=ios
build:ios_x64 --platforms=@build_bazel_apple_support//platforms:ios_x86_64 --apple_platform_type=ios

build:watchos_arm64 --platforms=@build_bazel_apple_support//platforms:watchos_arm64_32 --apple_platform_type=watchos
build:watchos_device_arm64 --platforms=@build_bazel_apple_support//platforms:watchos_device_arm64 --apple_platform_type=watchos
build:watchos_simulator_arm64 --platforms=@build_bazel_apple_support//platforms:watchos_arm64 --apple_platform_type=watchos
build:watchos_arm32 --platforms=@build_bazel_apple_support//platforms:watchos_armv7k --apple_platform_type=watchos
build:watchos_x64 --platforms=@build_bazel_apple_support//platforms:watchos_x86_64 --apple_platform_type=watchos

build:tvos_arm64 --platforms=@build_bazel_apple_support//platforms:tvos_arm64 --apple_platform_type=watchos
build:tvos_simulator_arm64 --platforms=@build_bazel_apple_support//platforms:tvos_sim_arm64 --apple_platform_type=watchos
build:tvos_x64 --platforms=@build_bazel_apple_support//platforms:tvos_x86_64 --apple_platform_type=watchos

build:linux_arm64 --platforms=//platforms:linux_arm64
build:linux_x64 --platforms=//platforms:linux_x86_64
2 changes: 1 addition & 1 deletion cinterop-c/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module(
bazel_dep(name = "rules_cc", version = "0.2.0")

# required to build for apple targets (like iOS)
bazel_dep(name = "apple_support", version = "1.22.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "apple_support", version = "1.24.5", repo_name = "build_bazel_apple_support")
bazel_dep(name = "platforms", version = "1.0.0")

# Protobuf
Expand Down
7 changes: 4 additions & 3 deletions cinterop-c/MODULE.bazel.lock

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

7 changes: 7 additions & 0 deletions cinterop-c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ The binary can be updated by running
./gradlew :grpc:grpc-core:buildDependencyCLibGrpc_fat_iosArm64
```

### Compiling for Apple targets

All Konan Apple targets have a corresponding build config in `.bazelrc`.
To tell Bazel the apple target constraints, we use the `apple_support` rules.
All apple target rules are defined in https://github.com/bazelbuild/apple_support/blob/master/configs/platforms.bzl.
For Konan Target to Apple triplet mapping, see https://kotlinlang.org/docs/native-target-support.html.

### Compiling for Linux

To produce K/N compatible static libraries, we use the Konan toolchain for compilation.
Expand Down
2 changes: 2 additions & 0 deletions cinterop-c/build_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CONFIG=release
mkdir -p "$(dirname "$DST")"

echo "==> Building $LABEL to $DST" >&2
echo "==> KONAN_HOME: $KONAN_HOME" >&2
echo "==> KONAN_TARGET: $KONAN_TARGET" >&2
KONAN_DEP="--define=KONAN_DEPS=$HOME/.konan/dependencies"
bazel build "$LABEL" --config="$KONAN_TARGET" --config="$CONFIG" "$KONAN_DEP" "--define=KONAN_HOME=$KONAN_HOME"

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2f1d56ea40ac752fafccd5aaa68590df5eea9079d415e12de195a310877a47e1
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc61d67cc2750cb1875d2746859d76b0ae8f8f55845953122b03eb3cc995919b
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5802e8f19880b1896f9dcaf46d8ff2a6ca20358e50929d587240126387b0ccfc
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6c1a6cf7a5241b0ed0a67032e3a7a2dfe0f9a479a9a2404b9dcf950e5c1aaf45
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4a855e7182aca9cddc2370c2a40f0c525a0c40c7c7b8976f5fae64f9dc297dae
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
317559545327693f336cf170afc798b0e3edad693b12540a949ec4478ea48db2
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bf68f618efa06869e12960484c18b7beaf91839bed113454e73e858eb0fa9d3c
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
043d6f84fd5af676b6257b5d95d2d0cc68860562cc28edcd585cd9aeff9e77e6
2 changes: 1 addition & 1 deletion docs/proxy-repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ However, all dependency changes MUST be reviewed before running CI.
For JetBrains developers, there is a possibility to use proxy repositories locally.
It is actually encouraged to do so.

For it to work, add the following properties to your `$HOME/gradle/gradle.properties` file
For it to work, add the following properties to your `$HOME/.gradle/gradle.properties` file
(or `local.properties` in the repository root):
```properties
kotlinx.rpc.team.space.username=<username>
Expand Down
9 changes: 0 additions & 9 deletions grpc/grpc-client/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,3 @@ kotlinx.rpc.exclude.wasmWasi=true
kotlinx.rpc.exclude.js=true
kotlinx.rpc.exclude.wasmJs=true
kotlinx.rpc.exclude.mingwX64=true
kotlinx.rpc.exclude.tvosArm64=true
kotlinx.rpc.exclude.tvosSimulatorArm64=true
kotlinx.rpc.exclude.tvosX64=true
kotlinx.rpc.exclude.watchosArm32=true
kotlinx.rpc.exclude.watchosDeviceArm64=true
kotlinx.rpc.exclude.watchosX64=true
# TODO: Remove once we ant to activate WatchOS (these two targets are already prepared for activation)
kotlinx.rpc.exclude.watchosArm64=true
kotlinx.rpc.exclude.watchosSimulatorArm64=true
9 changes: 0 additions & 9 deletions grpc/grpc-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,3 @@ kotlinx.rpc.exclude.wasmWasi=true
kotlinx.rpc.exclude.js=true
kotlinx.rpc.exclude.wasmJs=true
kotlinx.rpc.exclude.mingwX64=true
kotlinx.rpc.exclude.tvosArm64=true
kotlinx.rpc.exclude.tvosSimulatorArm64=true
kotlinx.rpc.exclude.tvosX64=true
kotlinx.rpc.exclude.watchosArm32=true
kotlinx.rpc.exclude.watchosDeviceArm64=true
kotlinx.rpc.exclude.watchosX64=true
# TODO: Remove once we ant to activate WatchOS (these two targets are already prepared for activation)
kotlinx.rpc.exclude.watchosArm64=true
kotlinx.rpc.exclude.watchosSimulatorArm64=true
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ class EchoServiceImpl : EchoService {
* Run this on JVM before executing tests.
*/
@Test
@Ignore
fun runServer() = runTest(timeout = Duration.INFINITE) {
val server = GrpcServer(
port = PORT,
Expand Down
16 changes: 13 additions & 3 deletions grpc/grpc-core/src/nativeInterop/cinterop/libkgrpc.def
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,21 @@ strictEnums = grpc_status_code grpc_connectivity_state grpc_call_error

staticLibraries.macos_arm64 = libkgrpc.macos_arm64.a libgrpc_fat.macos_arm64.a
staticLibraries.macos_x64 = libkgrpc.macos_x64.a libgrpc_fat.macos_x64.a

staticLibraries.ios_arm64 = libkgrpc.ios_arm64.a libgrpc_fat.ios_arm64.a
staticLibraries.ios_simulator_arm64 = libkgrpc.ios_simulator_arm64.a libgrpc_fat.ios_simulator_arm64.a
staticLibraries.ios_x64 = libkgrpc.ios_x64.a libgrpc_fat.ios_x64.a

staticLibraries.watchos_arm64 = libkgrpc.watchos_arm64.a libgrpc_fat.watchos_arm64.a
staticLibraries.watchos_device_arm64 = libkgrpc.watchos_device_arm64.a libgrpc_fat.watchos_device_arm64.a
staticLibraries.watchos_simulator_arm64 = libkgrpc.watchos_simulator_arm64.a libgrpc_fat.watchos_simulator_arm64.a
staticLibraries.watchos_arm32 = libkgrpc.watchos_arm32.a libgrpc_fat.watchos_arm32.a
staticLibraries.watchos_x64 = libkgrpc.watchos_x64.a libgrpc_fat.watchos_x64.a

staticLibraries.tvos_arm64 = libkgrpc.tvos_arm64.a libgrpc_fat.tvos_arm64.a
staticLibraries.tvos_simulator_arm64 = libkgrpc.tvos_simulator_arm64.a libgrpc_fat.tvos_simulator_arm64.a
staticLibraries.tvos_x64 = libkgrpc.tvos_x64.a libgrpc_fat.tvos_x64.a

staticLibraries.linux_arm64 = libkgrpc.linux_arm64.a libgrpc_fat.linux_arm64.a
staticLibraries.linux_x64 = libkgrpc.linux_x64.a libgrpc_fat.linux_x64.a
# TODO: Uncomment when activating WatchOS
# staticLibraries.watchos_arm64 = libkgrpc_fat.watchos_arm64.a
# staticLibraries.watchos_simulator_arm64 = libkgrpc_fat.watchos_simulator_arm64.a

9 changes: 0 additions & 9 deletions grpc/grpc-server/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,3 @@ kotlinx.rpc.exclude.wasmWasi=true
kotlinx.rpc.exclude.js=true
kotlinx.rpc.exclude.wasmJs=true
kotlinx.rpc.exclude.mingwX64=true
kotlinx.rpc.exclude.tvosArm64=true
kotlinx.rpc.exclude.tvosSimulatorArm64=true
kotlinx.rpc.exclude.tvosX64=true
kotlinx.rpc.exclude.watchosArm32=true
kotlinx.rpc.exclude.watchosDeviceArm64=true
kotlinx.rpc.exclude.watchosX64=true
# TODO: Remove once we ant to activate WatchOS (these two targets are already prepared for activation)
kotlinx.rpc.exclude.watchosArm64=true
kotlinx.rpc.exclude.watchosSimulatorArm64=true
9 changes: 0 additions & 9 deletions protobuf/protobuf-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,3 @@ kotlinx.rpc.exclude.wasmWasi=true
kotlinx.rpc.exclude.js=true
kotlinx.rpc.exclude.wasmJs=true
kotlinx.rpc.exclude.mingwX64=true
kotlinx.rpc.exclude.tvosArm64=true
kotlinx.rpc.exclude.tvosSimulatorArm64=true
kotlinx.rpc.exclude.tvosX64=true
kotlinx.rpc.exclude.watchosArm32=true
kotlinx.rpc.exclude.watchosDeviceArm64=true
kotlinx.rpc.exclude.watchosX64=true
# TODO: Remove once we ant to activate WatchOS (these two targets are already prepared for activation)
kotlinx.rpc.exclude.watchosArm64=true
kotlinx.rpc.exclude.watchosSimulatorArm64=true
16 changes: 12 additions & 4 deletions protobuf/protobuf-core/src/nativeInterop/cinterop/libprotowire.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ headerFilter = protowire.h

noStringConversion = pw_encoder_write_string


staticLibraries.macos_arm64 = libprotowire_fat.macos_arm64.a
staticLibraries.macos_x64 = libprotowire_fat.macos_x64.a

staticLibraries.ios_arm64 = libprotowire_fat.ios_arm64.a
staticLibraries.ios_simulator_arm64 = libprotowire_fat.ios_simulator_arm64.a
staticLibraries.ios_x64 = libprotowire_fat.ios_x64.a

staticLibraries.watchos_arm64 = libprotowire_fat.watchos_arm64.a
staticLibraries.watchos_device_arm64 = libprotowire_fat.watchos_device_arm64.a
staticLibraries.watchos_simulator_arm64 = libprotowire_fat.watchos_simulator_arm64.a
staticLibraries.watchos_arm32 = libprotowire_fat.watchos_arm32.a
staticLibraries.watchos_x64 = libprotowire_fat.watchos_x64.a

staticLibraries.tvos_arm64 = libprotowire_fat.tvos_arm64.a
staticLibraries.tvos_simulator_arm64 = libprotowire_fat.tvos_simulator_arm64.a
staticLibraries.tvos_x64 = libprotowire_fat.tvos_x64.a

staticLibraries.linux_arm64 = libprotowire_fat.linux_arm64.a
staticLibraries.linux_x64 = libprotowire_fat.linux_x64.a
# TODO: Uncomment when activating WatchOS
# staticLibraries.watchos_arm64 = libprotowire_fat.watchos_arm64_32.a
# staticLibraries.watchos_simulator_arm64 = libprotowire_fat.watchos_sim_arm64.a
Loading