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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Regen confirm unchanged
if: ${{ matrix.checkTarget }}
run: |
dotnet tool install --global --version 18.1.0 ClangSharpPInvokeGenerator
dotnet tool install --global --version '[20.1.2.1]' ClangSharpPInvokeGenerator
ClangSharpPInvokeGenerator @src/Temporalio/Bridge/GenerateInterop.rsp
dotnet run --project src/Temporalio.Api.Generator
npx doctoc README.md
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- "releases/*"
workflow_dispatch: {}

jobs:
build-bridge-libraries:
Expand All @@ -13,35 +14,35 @@ jobs:
os: [ubuntu-latest, ubuntu-arm, alpine-latest, macos-intel, macos-arm, windows-latest]
include:
- os: ubuntu-latest
out-file: libtemporal_sdk_bridge.so
out-file: libtemporal_sdk_core_c_bridge.so
out-prefix: linux-x64
# We use the Python manylinux image for glibc compatibility
container: quay.io/pypa/manylinux2014_x86_64
protobuf-url: https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip
- os: ubuntu-arm
out-file: libtemporal_sdk_bridge.so
out-file: libtemporal_sdk_core_c_bridge.so
out-prefix: linux-arm64
runsOn: ubuntu-24.04-arm64-2-core
# We use the Python manylinux image for glibc compatibility
container: quay.io/pypa/manylinux2014_aarch64
protobuf-url: https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-aarch_64.zip
- os: alpine-latest
out-file: libtemporal_sdk_bridge.so
out-file: libtemporal_sdk_core_c_bridge.so
out-prefix: linux-musl-x64
# Need Alpine container since GH runner doesn't have one
container: mcr.microsoft.com/dotnet/sdk:8.0-alpine
protobuf-url: https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip
runsOn: ubuntu-latest
- os: macos-intel
out-file: libtemporal_sdk_bridge.dylib
out-file: libtemporal_sdk_core_c_bridge.dylib
out-prefix: osx-x64
runsOn: macos-13
- os: macos-arm
out-file: libtemporal_sdk_bridge.dylib
out-file: libtemporal_sdk_core_c_bridge.dylib
out-prefix: osx-arm64
runsOn: macos-14
- os: windows-latest
out-file: temporal_sdk_bridge.dll
out-file: temporal_sdk_core_c_bridge.dll
out-prefix: win-x64
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
Expand Down Expand Up @@ -73,7 +74,7 @@ jobs:

- name: Build (non-Docker)
if: ${{ !matrix.container }}
run: cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release
run: cargo build --manifest-path src/Temporalio/Bridge/sdk-core/core-c-bridge/Cargo.toml --profile release-lto

- name: Build (Docker non-Alpine)
if: ${{ matrix.container && matrix.os != 'alpine-latest' }}
Expand All @@ -86,7 +87,7 @@ jobs:
&& curl -LO ${{ matrix.protobuf-url }} \
&& unzip protoc-*.zip -d /usr/local/protobuf \
&& export PATH="$PATH:/usr/local/protobuf/bin" \
&& cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release \
&& cargo build --manifest-path src/Temporalio/Bridge/sdk-core/core-c-bridge/Cargo.toml --profile release-lto \
'

- name: Build (Docker Alpine)
Expand All @@ -101,14 +102,14 @@ jobs:
&& curl -LO ${{ matrix.protobuf-url }} \
&& unzip protoc-*.zip -d /usr/local/protobuf \
&& export PATH="$PATH:/usr/local/protobuf/bin" \
&& RUSTFLAGS="-C target-feature=-crt-static" cargo build --manifest-path src/Temporalio/Bridge/Cargo.toml --release \
&& RUSTFLAGS="-C target-feature=-crt-static" cargo build --manifest-path src/Temporalio/Bridge/sdk-core/core-c-bridge/Cargo.toml --profile release-lto \
'

- name: Upload bridge library
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.out-prefix }}-bridge
path: src/Temporalio/Bridge/target/release/${{ matrix.out-file }}
path: src/Temporalio/Bridge/sdk-core/target/release-lto/${{ matrix.out-file }}
if-no-files-found: error

build-nuget-package:
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1128,10 +1128,11 @@ See the

### Built-in Native Shared Library

This SDK requires a built-in unmanaged, native shared library built in Rust. It is named `temporal_sdk_bridge.dll` on
Windows, `libtemporal_sdk_bridge.so` on Linux, and `libtemporal_sdk_bridge.dylib` on macOS. This is automatically
included when using modern versions of .NET on a common platform. If you are using .NET framework, you may have to
explicitly set the platform to `x64` or `arm64` because `AnyCPU` will not choose the proper library.
This SDK requires a built-in unmanaged, native shared library built in Rust. It is named
`temporal_sdk_core_c_bridge.dll` on Windows, `libtemporal_sdk_core_c_bridge.so` on Linux, and
Copy link
Member

@cretz cretz Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make a big note in PR description that we are changing the shared library filename? We also have to make a big, clear note in release notes when we do our next release. I'm pretty sure some users have existing build code that copies artifacts to, say, docker containers or their prod systems that may hardcode expectations of artifact names. So it's kinda a breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

`libtemporal_sdk_core_c_bridge.dylib` on macOS. This is automatically included when using modern versions of .NET
on a common platform. If you are using .NET framework, you may have to explicitly set the platform to `x64` or `arm64`
because `AnyCPU` will not choose the proper library.

Currently we only support [RIDs](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog) `linux-arm64`,
`linux-x64`, `linux-musl-x64`, `osx-arm64`, `osx-x64`, and `win-x64`. Any other platforms needed (e.g. `linux-musl-x64`
Expand All @@ -1144,8 +1145,8 @@ Redistributable installation).

If the native shared library is not loading for whatever reason, the following error may appear:

> System.DllNotFoundException: Unable to load DLL 'temporal_sdk_bridge' or one of its dependencies: The specified module
could not be found.
> System.DllNotFoundException: Unable to load DLL 'temporal_sdk_core_c_bridge' or one of its dependencies: The specified
> module could not be found.

See the earlier part of this section for details on what environments are supported.

Expand Down
48 changes: 25 additions & 23 deletions src/Temporalio/Api/Batch/V1/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,29 @@ static MessageReflection() {
"bW1vbi52MS5QYXlsb2FkcxIuCgZoZWFkZXIYAyABKAsyHi50ZW1wb3JhbC5h",
"cGkuY29tbW9uLnYxLkhlYWRlchIQCghpZGVudGl0eRgEIAEoCSIuChpCYXRj",
"aE9wZXJhdGlvbkNhbmNlbGxhdGlvbhIQCghpZGVudGl0eRgBIAEoCSIqChZC",
"YXRjaE9wZXJhdGlvbkRlbGV0aW9uEhAKCGlkZW50aXR5GAEgASgJIqYCChNC",
"YXRjaE9wZXJhdGlvbkRlbGV0aW9uEhAKCGlkZW50aXR5GAEgASgJIq4CChNC",
"YXRjaE9wZXJhdGlvblJlc2V0EhAKCGlkZW50aXR5GAMgASgJEjUKB29wdGlv",
"bnMYBCABKAsyJC50ZW1wb3JhbC5hcGkuY29tbW9uLnYxLlJlc2V0T3B0aW9u",
"cxI0CgpyZXNldF90eXBlGAEgASgOMiAudGVtcG9yYWwuYXBpLmVudW1zLnYx",
"LlJlc2V0VHlwZRJDChJyZXNldF9yZWFwcGx5X3R5cGUYAiABKA4yJy50ZW1w",
"b3JhbC5hcGkuZW51bXMudjEuUmVzZXRSZWFwcGx5VHlwZRJLChVwb3N0X3Jl",
"c2V0X29wZXJhdGlvbnMYBSADKAsyLC50ZW1wb3JhbC5hcGkud29ya2Zsb3cu",
"djEuUG9zdFJlc2V0T3BlcmF0aW9uIskBCixCYXRjaE9wZXJhdGlvblVwZGF0",
"ZVdvcmtmbG93RXhlY3V0aW9uT3B0aW9ucxIQCghpZGVudGl0eRgBIAEoCRJW",
"Chp3b3JrZmxvd19leGVjdXRpb25fb3B0aW9ucxgCIAEoCzIyLnRlbXBvcmFs",
"LmFwaS53b3JrZmxvdy52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dGNoT3BlcmF0",
"aW9uVXBkYXRlV29ya2Zsb3dFeGVjdXRpb25PcHRpb25zEhAKCGlkZW50aXR5",
"GAEgASgJElYKGndvcmtmbG93X2V4ZWN1dGlvbl9vcHRpb25zGAIgASgLMjIu",
"dGVtcG9yYWwuYXBpLndvcmtmbG93LnYxLldvcmtmbG93RXhlY3V0aW9uT3B0",
"aW9ucxIvCgt1cGRhdGVfbWFzaxgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5G",
"aWVsZE1hc2siwAEKH0JhdGNoT3BlcmF0aW9uVW5wYXVzZUFjdGl2aXRpZXMS",
"EAoIaWRlbnRpdHkYASABKAkSDgoEdHlwZRgCIAEoCUgAEhMKCW1hdGNoX2Fs",
"bBgDIAEoCEgAEhYKDnJlc2V0X2F0dGVtcHRzGAQgASgIEhcKD3Jlc2V0X2hl",
"YXJ0YmVhdBgFIAEoCBIpCgZqaXR0ZXIYBiABKAsyGS5nb29nbGUucHJvdG9i",
"dWYuRHVyYXRpb25CCgoIYWN0aXZpdHkihAEKIUJhdGNoT3BlcmF0aW9uVHJp",
"Z2dlcldvcmtmbG93UnVsZRIQCghpZGVudGl0eRgBIAEoCRIMCgJpZBgCIAEo",
"CUgAEjcKBHNwZWMYAyABKAsyJy50ZW1wb3JhbC5hcGkucnVsZXMudjEuV29y",
"a2Zsb3dSdWxlU3BlY0gAQgYKBHJ1bGVChAEKGGlvLnRlbXBvcmFsLmFwaS5i",
"YXRjaC52MUIMTWVzc2FnZVByb3RvUAFaIWdvLnRlbXBvcmFsLmlvL2FwaS9i",
"YXRjaC92MTtiYXRjaKoCF1RlbXBvcmFsaW8uQXBpLkJhdGNoLlYx6gIaVGVt",
"cG9yYWxpbzo6QXBpOjpCYXRjaDo6VjFiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Temporalio.Api.Common.V1.MessageReflection.Descriptor, global::Temporalio.Api.Enums.V1.BatchOperationReflection.Descriptor, global::Temporalio.Api.Enums.V1.ResetReflection.Descriptor, global::Temporalio.Api.Rules.V1.MessageReflection.Descriptor, global::Temporalio.Api.Workflow.V1.MessageReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
Expand Down Expand Up @@ -1474,8 +1474,9 @@ public string Identity {
public const int ResetTypeFieldNumber = 1;
private global::Temporalio.Api.Enums.V1.ResetType resetType_ = global::Temporalio.Api.Enums.V1.ResetType.Unspecified;
/// <summary>
/// Reset type (deprecated, use `options`).
/// Deprecated. Use `options`.
/// </summary>
[global::System.ObsoleteAttribute]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Temporalio.Api.Enums.V1.ResetType ResetType {
Expand All @@ -1489,8 +1490,9 @@ public string Identity {
public const int ResetReapplyTypeFieldNumber = 2;
private global::Temporalio.Api.Enums.V1.ResetReapplyType resetReapplyType_ = global::Temporalio.Api.Enums.V1.ResetReapplyType.Unspecified;
/// <summary>
/// History event reapply options (deprecated, use `options`).
/// Deprecated. Use `options`.
/// </summary>
[global::System.ObsoleteAttribute]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Temporalio.Api.Enums.V1.ResetReapplyType ResetReapplyType {
Expand Down
Loading