Skip to content

Commit 021a3b7

Browse files
committed
Added the streams bridge feature that links temporalio-streams.
The feature builds the crate's Stream runtime for a backend, on Redis or on the memory Store. The official wheels and the FIPS build turn it on. `StreamCallError` is in every build, so Python can map its errors.
1 parent 3b5ab58 commit 021a3b7

9 files changed

Lines changed: 562 additions & 10 deletions

File tree

‎.gitmodules‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "sdk-core"]
22
path = temporalio/bridge/sdk-core
3-
url = https://github.com/temporalio/sdk-rust.git
3+
url = https://github.com/moetemp/sdk-rust.git

‎pyproject.toml‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ dev = [
9797
]
9898

9999
[tool.poe.tasks]
100-
build-develop = "uv run maturin develop --uv"
101-
build-develop-with-release = { cmd = "uv run maturin develop --release --uv" }
100+
build-develop = "uv run maturin develop --uv --features streams"
101+
build-develop-with-release = { cmd = "uv run maturin develop --release --uv --features streams" }
102102
# FIPS builds: swap the rustls stack onto aws-lc-rs FIPS mode (aws-lc-fips-sys), eliminating `ring`.
103103
build-develop-fips = { cmd = "uv run maturin develop --uv --no-default-features --features fips", env = { TEMPORALIO_FIPS = "1" } }
104104
build-wheel-fips = { cmd = "uv run maturin build --release --no-default-features --features fips", env = { TEMPORALIO_FIPS = "1" } }
@@ -166,18 +166,20 @@ filterwarnings = [
166166
before-all = "pip install protoc-wheel-0"
167167
build = "cp310-win_amd64 cp310-manylinux_x86_64 cp310-manylinux_aarch64 cp310-musllinux_x86_64 cp310-musllinux_aarch64 cp310-macosx_x86_64 cp310-macosx_arm64"
168168
build-verbosity = 1
169+
# The official wheels link the Stream runtime.
170+
environment = { MATURIN_PEP517_ARGS = "--features streams" }
169171

170172
[tool.cibuildwheel.macos]
171-
environment = { MACOSX_DEPLOYMENT_TARGET = "10.12" }
173+
environment = { MACOSX_DEPLOYMENT_TARGET = "10.12", MATURIN_PEP517_ARGS = "--features streams" }
172174

173175
[tool.cibuildwheel.linux]
174176
before-all = "sh scripts/cibuildwheel_before_all_linux.sh"
175177
before-build = "sh scripts/cibuildwheel_before_build_linux.sh"
176-
environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI = "true" }
178+
environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI = "true", MATURIN_PEP517_ARGS = "--features streams" }
177179

178180
[[tool.cibuildwheel.overrides]]
179181
select = "*musllinux*"
180-
environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI = "true", RUSTFLAGS = "-C target-feature=-crt-static" }
182+
environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI = "true", RUSTFLAGS = "-C target-feature=-crt-static", MATURIN_PEP517_ARGS = "--features streams" }
181183

182184
[tool.mypy]
183185
ignore_missing_imports = true
@@ -189,6 +191,8 @@ exclude = [
189191
'temporalio/common/_streams/proto',
190192
'temporalio/common/_streams/system',
191193
'temporalio/common/_streams/writer_system',
194+
# The Core submodule, which has a script of the crate's test vectors
195+
'temporalio/bridge/sdk-core',
192196
]
193197

194198
[[tool.mypy.overrides]]
@@ -206,7 +210,7 @@ ignore_errors = true
206210
[tool.pydocstyle]
207211
convention = "google"
208212
# https://github.com/PyCQA/pydocstyle/issues/363#issuecomment-625563088
209-
match_dir = "^(?!(docs|scripts|tests|api|proto|system|writer_system|_support|notifications|\\.)).*"
213+
match_dir = "^(?!(docs|scripts|tests|api|proto|system|writer_system|_support|notifications|sdk-core|\\.)).*"
210214
add_ignore = [
211215
# We like to wrap at a certain number of chars, even long summary sentences.
212216
# https://github.com/PyCQA/pydocstyle/issues/184
@@ -276,10 +280,14 @@ exclude = [
276280
"temporalio/bridge/_visitor.py",
277281
"temporalio/common/_streams/proto",
278282
"tests/worker/workflow_sandbox/testmodules/proto",
283+
# The Core submodule, which has a script of the crate's test vectors
284+
"temporalio/bridge/sdk-core",
279285
]
280286

281287
[tool.ruff]
282288
target-version = "py310"
289+
# The Core submodule, which has a script of the crate's test vectors
290+
extend-exclude = ["temporalio/bridge/sdk-core"]
283291

284292
[build-system]
285293
requires = ["maturin>=1.0,<2.0"]

0 commit comments

Comments
 (0)