Skip to content

Static C bridge support#1008

Merged
cretz merged 2 commits intotemporalio:masterfrom
cretz:c-bridge-static
Sep 11, 2025
Merged

Static C bridge support#1008
cretz merged 2 commits intotemporalio:masterfrom
cretz:c-bridge-static

Conversation

@cretz
Copy link
Copy Markdown
Contributor

@cretz cretz commented Sep 11, 2025

What was changed

  • Added a new xz2-static feature to core-bridge
    • Had to adjust the zip library to remove some features we don't care about to make sure it can work
  • Added CI test to ensure static C bridge works

Checklist

  1. Closes [Bug] C bridge cannot always be linked against when built statically #982

@cretz cretz marked this pull request as ready for review September 11, 2025 14:50
@cretz cretz requested a review from a team as a code owner September 11, 2025 14:50
Comment thread .github/workflows/per-pr.yml Outdated
Comment on lines +202 to +213
run: |
cat > test.c <<'EOF'
#include "temporal-sdk-core-c-bridge.h"
#include <stdio.h>

int main(void) {
struct TemporalCoreCancellationToken *tok = temporal_core_cancellation_token_new();
temporal_core_cancellation_token_free(tok);
printf("C bridge static link test passed!\\n");
return 0;
}
EOF
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd rather have this not inline in the workflow. We can just put it in tests/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will move it there, it just never really runs there and requires certain gcc setup and such, but no prob

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Copy Markdown
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

Thanks!

@cretz cretz merged commit 85b9f09 into temporalio:master Sep 11, 2025
18 of 19 checks passed
@cretz cretz deleted the c-bridge-static branch September 11, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] C bridge cannot always be linked against when built statically

2 participants