Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/streams-k16-c-bridge
branch
from
October 28, 2026 18:45
03b90d5 to
ede2244
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k15-buffers
branch
from
October 28, 2026 18:45
c843c16 to
6e9fe8f
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k16-c-bridge
branch
from
October 28, 2026 18:59
ede2244 to
d95e055
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k15-buffers
branch
from
October 28, 2026 18:59
6e9fe8f to
2aa1859
Compare
moetemp
marked this pull request as draft
October 28, 2026 21:55
moetemp
force-pushed
the
moe/brook/review/streams-k15-buffers
branch
from
October 28, 2026 22:42
2aa1859 to
8bf74f3
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k16-c-bridge
branch
2 times, most recently
from
October 29, 2026 04:06
72461b0 to
a78ca55
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k15-buffers
branch
2 times, most recently
from
October 29, 2026 08:37
515ba9c to
aac18ed
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k16-c-bridge
branch
2 times, most recently
from
October 29, 2026 09:17
5248d63 to
5e0e4ef
Compare
The .NET SDK reaches Core through this bridge, so it gets the Stream runtime here, behind the optional `streams` and `streams-redis` features. The functions exist in every build, so the header stays the same.
moetemp
force-pushed
the
moe/brook/review/streams-k15-buffers
branch
from
October 29, 2026 10:03
07f6bec to
ebb26f8
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k16-c-bridge
branch
from
October 29, 2026 10:03
5e0e4ef to
96fa426
Compare
Owner
Author
|
Parked. No SDK uses the Stream runtime through the C bridge yet. The branch stays, and this layer comes back with the .NET port. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR adds the Stream runtime of
temporalio-streamsto the C bridge, for the .NET SDK.src/streams.rs.temporal_core_stream_runtime_newbuilds the runtime of a kind (memoryorredis) from its encoded config.temporal_core_stream_callruns a method on Core's Tokio runtime and calls back with the result, and the existingTemporalCoreCancellationTokencancels it with code 1.temporal_core_stream_call_syncandtemporal_core_stream_call_staticanswer at once.TemporalCoreByteArrayRef. An empty one may have a null pointer.INTERNAL, since a panic can't cross the C ABI.TemporalCoreByteArray, which the caller frees withtemporal_core_byte_array_free. A failure gives the gRPC code, the message and the encodedStreamErrorDetails.streamsadds the optional path dependency ontemporalio-streams.streams-redisadds the optional dependency ontemporalio-streams-redis.Interop.csdon't change with the features. Withoutstreams, a runtime fails to build with "This build has no Stream runtime". Withoutstreams-redis, therediskind fails the same way.temporalio-streams-redisisn't on crates.io yet. So the workspace patches it to R4 (temporal-community/sdk-streams#4) by gitrev, and patches that crate'stemporalio-streamsandtemporalio-commonto this workspace's copies. Eachcargocall in this workspace now fetches that git repo, with the features off too.Depends on #225 (K15). Review lane is the Rust reviewers.
Part of the Brook review series.
Spencer, can the C bridge take this optional dependency on the community Redis crate, behind
streams-redisand off by default, as we discussed? Once the crate is on crates.io, the git patch goes and it's a plain crates.io dependency. The other choice is a .NET-owned wrapper cdylib that links this bridge as an rlib, but that renames the native library and changes much ofInterop.cs.Why?
.NET reaches Core only through this bridge, and a second native library couldn't share Core's Tokio runtime or its meter. So the .NET SDK's Stream runtime has to be in this cdylib. The official .NET build turns both features on, and other builds stay as they are.
How did you test it?
cargo clippy -- -D warningsand the bridge'sstreamstests pass with no features, withstreams, and withstreams,streams-redis, and the header is the same after each build. The tests calltemporal_core_stream_callon the memory runtime through a callback, check a failure's code and details, cancel a 30 s read through a token, and call the sync and static functions.cargo docpasses with every feature.