Repository navigation
Conversation
This was referenced Nov 14, 2026
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 14, 2026 01:52
416ce80 to
f625228
Compare
A Stream id and a Producer id are opaque bytes, since the caller builds both. The Store requires a non-empty Producer id of at most 4096 bytes, and a kind.
A Store crate runs the suite on its own Store through `testing::TestStore`. The suite checks that a Producer id is stored as bytes, also with a field separator in it.
A bridge calls `StreamRuntime::call` with an operation name and the encoded request. The read path, the metrics and the shared service suite come with it, and the Store name is on each ref it builds.
The fence of a Producer is kept by kind and id, so the id of a run-based kind must hold its run. The shared suites now cover two runs, two kinds with one id, any text in an id and a close of each kind, so every Store keeps these rules.
The repo has no Python, so the script is now an example of the Stream crate. It is still a second implementation, and it shares no code with the modules that the vector tests check.
The crate is for the maintainers of the language SDKs, so its entry is lang-internal.
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 14, 2026 09:04
f625228 to
c7f318b
Compare
This branch has not been deployed
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 was changed
This PR adds the
temporalio-streamscrate. It runs the five operations of the Stream service (create, append, read, close and describe) on a Stream Store, for the SDK bridges. It is experimental, and Core's Worker gets no Stream code.How a call flows
An SDK generates its Streams API from the Stream WIT, and hands each call to its bridge as an operation name and an encoded request. The bridge calls
StreamRuntime::call(operation, request)and gets the encoded response. That call goes to one typed method for each operation. The method applies the rules that every Store shares, and then calls the Store.What is in the crate
store.rs,store/lazy.rsStoretrait and its capabilities.LazyStoreconnects a Store on its first call, so a bridge can build the runtime with no async runtime.runtime.rs,read.rs,dispatch.rsStreamRuntimewith its typed methods, the long-poll read, and the byte form of the calls.epoch.rs,ids.rs,offset.rs,record.rs,digest.rsmemory.rserror.rs,metrics.rsStreamErrorwith its reason and gRPC code, and the metrics of the runtime.testing/test-supportfeature. Each Store crate runs them on its own Store.testdata/,examples/gen_vectors.rsContract
sequenceis written once. The samesequencewith other content fails.Why?
Without this crate, each SDK would write these rules again in its own language. With it, the Python, TypeScript and .NET bridges link the same code, and every Store passes the same suite.
The base is the branch of #1733, which adds the Stream protos and the WIT. The Redis Store is a crate of its own, in temporal-community/sdk-streams#8.
Checklist
How was this tested:
cargo test -p temporalio-streamsruns the unit tests, the shared suites on the memory Store, and the tests of the shared vectors.Any docs updates needed?
README.md.