@temporalio/core-bridge 1.13.2 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +135 -100
- package/Cargo.toml +3 -2
- package/{sdk-core/fsm/rustfsm_trait/LICENSE.txt → LICENSE} +5 -5
- package/README.md +0 -1
- package/bridge-macros/Cargo.toml +16 -0
- package/bridge-macros/src/derive_js_function.rs +126 -0
- package/bridge-macros/src/derive_tryfromjs.rs +138 -0
- package/bridge-macros/src/derive_tryintojs.rs +151 -0
- package/bridge-macros/src/lib.rs +42 -0
- package/lib/native.d.ts +13 -6
- package/package.json +6 -5
- package/releases/aarch64-apple-darwin/index.node +0 -0
- package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
- package/releases/x86_64-apple-darwin/index.node +0 -0
- package/releases/x86_64-pc-windows-msvc/index.node +0 -0
- package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
- package/sdk-core/.cargo/config.toml +9 -3
- package/sdk-core/.github/workflows/per-pr.yml +42 -5
- package/sdk-core/AGENTS.md +17 -19
- package/sdk-core/Cargo.toml +6 -7
- package/sdk-core/README.md +12 -15
- package/sdk-core/arch_docs/diagrams/deps.svg +102 -0
- package/sdk-core/{client → crates/client}/Cargo.toml +7 -9
- package/sdk-core/{client → crates/client}/src/lib.rs +110 -159
- package/sdk-core/{client → crates/client}/src/metrics.rs +1 -1
- package/sdk-core/{client → crates/client}/src/raw.rs +73 -44
- package/sdk-core/crates/client/src/request_extensions.rs +40 -0
- package/sdk-core/{client → crates/client}/src/retry.rs +24 -17
- package/sdk-core/crates/client/src/worker/mod.rs +1468 -0
- package/sdk-core/{client → crates/client}/src/workflow_handle/mod.rs +4 -4
- package/sdk-core/{core-api → crates/common}/Cargo.toml +17 -8
- package/sdk-core/crates/common/protos/api_cloud_upstream/VERSION +1 -0
- package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/account/v1/message.proto +18 -0
- package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/request_response.proto +38 -11
- package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/service.proto +21 -4
- package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/operation/v1/message.proto +6 -6
- package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/sink/v1/message.proto +22 -0
- package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/workflows/create-release.yml +5 -0
- package/sdk-core/{core-api → crates/common}/src/envconfig.rs +2 -2
- package/sdk-core/{core-api → crates/common}/src/errors.rs +8 -1
- package/sdk-core/{fsm/rustfsm_trait/src/lib.rs → crates/common/src/fsm_trait.rs} +1 -27
- package/sdk-core/{core-api → crates/common}/src/lib.rs +24 -9
- package/sdk-core/{sdk-core-protos/src → crates/common/src/protos}/canned_histories.rs +1 -1
- package/sdk-core/{sdk-core-protos/src → crates/common/src/protos}/history_builder.rs +1 -1
- package/sdk-core/{sdk-core-protos/src → crates/common/src/protos}/history_info.rs +2 -2
- package/sdk-core/{sdk-core-protos/src/lib.rs → crates/common/src/protos/mod.rs} +18 -17
- package/sdk-core/{sdk-core-protos/src → crates/common/src/protos}/test_utils.rs +1 -1
- package/sdk-core/{core-api → crates/common}/src/telemetry/metrics.rs +447 -50
- package/sdk-core/{core-api → crates/common}/src/telemetry.rs +3 -1
- package/sdk-core/{core-api → crates/common}/src/worker.rs +112 -18
- package/sdk-core/crates/common/tests/worker_task_types_test.rs +129 -0
- package/sdk-core/crates/macros/Cargo.toml +23 -0
- package/sdk-core/{fsm/rustfsm_procmacro → crates/macros}/src/lib.rs +6 -11
- package/sdk-core/{sdk → crates/sdk}/Cargo.toml +10 -10
- package/sdk-core/{sdk → crates/sdk}/src/activity_context.rs +8 -6
- package/sdk-core/{sdk → crates/sdk}/src/interceptors.rs +1 -1
- package/sdk-core/{sdk → crates/sdk}/src/lib.rs +42 -37
- package/sdk-core/{sdk → crates/sdk}/src/workflow_context/options.rs +2 -2
- package/sdk-core/{sdk → crates/sdk}/src/workflow_context.rs +21 -19
- package/sdk-core/{sdk → crates/sdk}/src/workflow_future.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/Cargo.toml +32 -25
- package/sdk-core/{tests → crates/sdk-core/benches}/workflow_replay_bench.rs +10 -10
- package/sdk-core/crates/sdk-core/machine_coverage/ActivityMachine_Coverage.puml +32 -0
- package/sdk-core/crates/sdk-core/machine_coverage/CancelExternalMachine_Coverage.puml +9 -0
- package/sdk-core/crates/sdk-core/machine_coverage/CancelWorkflowMachine_Coverage.puml +6 -0
- package/sdk-core/crates/sdk-core/machine_coverage/ChildWorkflowMachine_Coverage.puml +27 -0
- package/sdk-core/crates/sdk-core/machine_coverage/CompleteWorkflowMachine_Coverage.puml +6 -0
- package/sdk-core/crates/sdk-core/machine_coverage/ContinueAsNewWorkflowMachine_Coverage.puml +6 -0
- package/sdk-core/crates/sdk-core/machine_coverage/FailWorkflowMachine_Coverage.puml +6 -0
- package/sdk-core/crates/sdk-core/machine_coverage/LocalActivityMachine_Coverage.puml +23 -0
- package/sdk-core/crates/sdk-core/machine_coverage/ModifyWorkflowPropertiesMachine_Coverage.puml +5 -0
- package/sdk-core/crates/sdk-core/machine_coverage/PatchMachine_Coverage.puml +8 -0
- package/sdk-core/crates/sdk-core/machine_coverage/SignalExternalMachine_Coverage.puml +12 -0
- package/sdk-core/crates/sdk-core/machine_coverage/TimerMachine_Coverage.puml +13 -0
- package/sdk-core/crates/sdk-core/machine_coverage/UpdateMachine_Coverage.puml +19 -0
- package/sdk-core/crates/sdk-core/machine_coverage/UpsertSearchAttributesMachine_Coverage.puml +5 -0
- package/sdk-core/crates/sdk-core/machine_coverage/WorkflowTaskMachine_Coverage.puml +11 -0
- package/sdk-core/{core → crates/sdk-core}/src/abstractions.rs +62 -6
- package/sdk-core/crates/sdk-core/src/antithesis.rs +60 -0
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/activity_tasks.rs +36 -31
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/mod.rs +12 -9
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/queries.rs +24 -21
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/replay_flag.rs +10 -8
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/updates.rs +17 -15
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/workers.rs +242 -17
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/workflow_cancels.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/src/core_tests/workflow_tasks.rs +126 -39
- package/sdk-core/{core → crates/sdk-core}/src/debug_client.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/src/ephemeral_server/mod.rs +3 -3
- package/sdk-core/crates/sdk-core/src/histfetch.rs +33 -0
- package/sdk-core/{core → crates/sdk-core}/src/internal_flags.rs +4 -3
- package/sdk-core/{core → crates/sdk-core}/src/lib.rs +85 -43
- package/sdk-core/{core → crates/sdk-core}/src/pollers/mod.rs +8 -6
- package/sdk-core/{core → crates/sdk-core}/src/pollers/poll_buffer.rs +51 -16
- package/sdk-core/{core → crates/sdk-core}/src/protosext/mod.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/src/protosext/protocol_messages.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/src/replay/mod.rs +14 -11
- package/sdk-core/{core → crates/sdk-core}/src/retry_logic.rs +19 -1
- package/sdk-core/{core → crates/sdk-core}/src/telemetry/log_export.rs +2 -2
- package/sdk-core/{core → crates/sdk-core}/src/telemetry/metrics.rs +80 -34
- package/sdk-core/{core → crates/sdk-core}/src/telemetry/mod.rs +4 -4
- package/sdk-core/{core → crates/sdk-core}/src/telemetry/otel.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/src/telemetry/prometheus_meter.rs +13 -13
- package/sdk-core/{core → crates/sdk-core}/src/telemetry/prometheus_server.rs +2 -2
- package/sdk-core/{core → crates/sdk-core}/src/test_help/integ_helpers.rs +127 -40
- package/sdk-core/{core → crates/sdk-core}/src/test_help/unit_helpers.rs +13 -11
- package/sdk-core/{core → crates/sdk-core}/src/worker/activities/activity_heartbeat_manager.rs +2 -2
- package/sdk-core/{core → crates/sdk-core}/src/worker/activities/local_activities.rs +14 -12
- package/sdk-core/{core → crates/sdk-core}/src/worker/activities.rs +21 -12
- package/sdk-core/{core → crates/sdk-core}/src/worker/client/mocks.rs +25 -12
- package/sdk-core/{core → crates/sdk-core}/src/worker/client.rs +164 -71
- package/sdk-core/crates/sdk-core/src/worker/heartbeat.rs +246 -0
- package/sdk-core/crates/sdk-core/src/worker/mod.rs +1462 -0
- package/sdk-core/{core → crates/sdk-core}/src/worker/nexus.rs +15 -14
- package/sdk-core/{core → crates/sdk-core}/src/worker/slot_provider.rs +12 -13
- package/sdk-core/{core → crates/sdk-core}/src/worker/tuner/fixed_size.rs +5 -1
- package/sdk-core/{core → crates/sdk-core}/src/worker/tuner/resource_based.rs +453 -57
- package/sdk-core/{core → crates/sdk-core}/src/worker/tuner.rs +21 -4
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/driven_workflow.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/history_update.rs +2 -2
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/activity_state_machine.rs +147 -37
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/cancel_external_state_machine.rs +8 -9
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/cancel_nexus_op_state_machine.rs +14 -12
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/cancel_workflow_state_machine.rs +6 -7
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/child_workflow_state_machine.rs +31 -37
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/complete_workflow_state_machine.rs +13 -8
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +6 -7
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/fail_workflow_state_machine.rs +6 -7
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/local_activity_state_machine.rs +33 -30
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/mod.rs +22 -17
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +4 -3
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/nexus_operation_state_machine.rs +20 -22
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/patch_state_machine.rs +12 -11
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/signal_external_state_machine.rs +9 -12
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/timer_state_machine.rs +26 -13
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/transition_coverage.rs +1 -2
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/update_state_machine.rs +19 -13
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +20 -18
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/workflow_machines/local_acts.rs +1 -1
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/workflow_machines.rs +61 -70
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/machines/workflow_task_state_machine.rs +13 -15
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/managed_run.rs +55 -37
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/mod.rs +166 -60
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/run_cache.rs +10 -7
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/wft_extraction.rs +4 -2
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/wft_poller.rs +15 -4
- package/sdk-core/{core → crates/sdk-core}/src/worker/workflow/workflow_stream.rs +30 -16
- package/sdk-core/{tests → crates/sdk-core/tests}/c_bridge_smoke_test.c +1 -1
- package/sdk-core/{tests → crates/sdk-core/tests}/cloud_tests.rs +1 -1
- package/sdk-core/crates/sdk-core/tests/common/fake_grpc_server.rs +106 -0
- package/sdk-core/{tests → crates/sdk-core/tests}/common/http_proxy.rs +1 -1
- package/sdk-core/{tests → crates/sdk-core/tests}/common/mod.rs +93 -74
- package/sdk-core/{tests → crates/sdk-core/tests}/common/workflows.rs +4 -3
- package/sdk-core/crates/sdk-core/tests/fsm_procmacro.rs +6 -0
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/dupe_transitions_fail.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/fsm_trybuild/dupe_transitions_fail.stderr +12 -0
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/dynamic_dest_pass.rs +2 -4
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/forgot_name_fail.rs +1 -3
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/forgot_name_fail.stderr +4 -4
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/handler_arg_pass.rs +2 -4
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/handler_pass.rs +2 -4
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/medium_complex_pass.rs +2 -4
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/no_handle_conversions_require_into_fail.rs +2 -4
- package/sdk-core/crates/sdk-core/tests/fsm_trybuild/no_handle_conversions_require_into_fail.stderr +15 -0
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/simple_pass.rs +2 -4
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/struct_event_variant_fail.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/fsm_trybuild/struct_event_variant_fail.stderr +5 -0
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/tuple_more_item_event_variant_fail.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/fsm_trybuild/tuple_more_item_event_variant_fail.stderr +5 -0
- package/sdk-core/{fsm/rustfsm_procmacro/tests/trybuild → crates/sdk-core/tests/fsm_trybuild}/tuple_zero_item_event_variant_fail.rs +1 -3
- package/sdk-core/crates/sdk-core/tests/fsm_trybuild/tuple_zero_item_event_variant_fail.stderr +5 -0
- package/sdk-core/{tests → crates/sdk-core/tests}/global_metric_tests.rs +14 -15
- package/sdk-core/{tests → crates/sdk-core/tests/heavy_tests}/fuzzy_workflow.rs +3 -3
- package/sdk-core/{tests → crates/sdk-core/tests}/heavy_tests.rs +19 -12
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/activity_functions.rs +1 -1
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/client_tests.rs +16 -111
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/ephemeral_server_tests.rs +5 -6
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/heartbeat_tests.rs +23 -19
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/metrics_tests.rs +134 -60
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/pagination_tests.rs +4 -4
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/polling_tests.rs +37 -36
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/queries_tests.rs +12 -10
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/update_tests.rs +41 -29
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/visibility_tests.rs +24 -19
- package/sdk-core/crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs +1061 -0
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/worker_tests.rs +113 -51
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/worker_versioning_tests.rs +19 -17
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/activities.rs +35 -30
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/appdata_propagation.rs +3 -3
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/cancel_external.rs +14 -9
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/cancel_wf.rs +13 -8
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/child_workflows.rs +48 -35
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/continue_as_new.rs +14 -9
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/determinism.rs +24 -15
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/eager.rs +9 -4
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/local_activities.rs +47 -47
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/modify_wf_properties.rs +16 -11
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/nexus.rs +51 -23
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/patches.rs +22 -10
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/replay.rs +19 -17
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/resets.rs +14 -5
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/signals.rs +24 -15
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/stickyness.rs +8 -6
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/timers.rs +28 -18
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/upsert_search_attrs.rs +18 -13
- package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests.rs +46 -41
- package/sdk-core/{tests → crates/sdk-core/tests}/main.rs +15 -9
- package/sdk-core/{tests → crates/sdk-core/tests}/manual_tests.rs +20 -14
- package/sdk-core/{tests → crates/sdk-core/tests}/runner.rs +2 -2
- package/sdk-core/{tests → crates/sdk-core/tests}/shared_tests/mod.rs +10 -5
- package/sdk-core/{tests → crates/sdk-core/tests}/shared_tests/priority.rs +5 -5
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/Cargo.toml +13 -10
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/include/temporal-sdk-core-c-bridge.h +32 -23
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/client.rs +55 -32
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/envconfig.rs +1 -1
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/lib.rs +1 -1
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/metric.rs +1 -1
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/runtime.rs +24 -9
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/testing.rs +1 -1
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/tests/context.rs +11 -10
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/tests/mod.rs +7 -7
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/tests/utils.rs +3 -4
- package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/worker.rs +111 -58
- package/sdk-core/docker-cgroup-tests.sh +24 -0
- package/sdk-core/{docker → etc/docker}/docker-compose-ci.yaml +9 -9
- package/sdk-core/{docker → etc/docker}/docker-compose-telem.yaml +11 -11
- package/sdk-core/{docker → etc/docker}/docker-compose.yaml +8 -8
- package/sdk-core/{integ-with-otel.sh → etc/integ-with-otel.sh} +1 -1
- package/sdk-core/etc/regen-depgraph.sh +2 -2
- package/src/client.rs +24 -33
- package/src/helpers/try_from_js.rs +1 -1
- package/src/logs.rs +1 -1
- package/src/metrics.rs +3 -3
- package/src/runtime.rs +42 -28
- package/src/testing.rs +3 -3
- package/src/worker.rs +70 -36
- package/ts/native.ts +13 -6
- package/LICENSE.md +0 -23
- package/sdk-core/client/src/worker_registry/mod.rs +0 -282
- package/sdk-core/core/src/worker/heartbeat.rs +0 -230
- package/sdk-core/core/src/worker/mod.rs +0 -990
- package/sdk-core/etc/deps.svg +0 -162
- package/sdk-core/fsm/Cargo.toml +0 -21
- package/sdk-core/fsm/README.md +0 -3
- package/sdk-core/fsm/rustfsm_procmacro/Cargo.toml +0 -27
- package/sdk-core/fsm/rustfsm_procmacro/LICENSE.txt +0 -21
- package/sdk-core/fsm/rustfsm_procmacro/tests/progress.rs +0 -8
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/dupe_transitions_fail.stderr +0 -12
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +0 -15
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/struct_event_variant_fail.stderr +0 -5
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_more_item_event_variant_fail.stderr +0 -5
- package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_zero_item_event_variant_fail.stderr +0 -5
- package/sdk-core/fsm/rustfsm_trait/Cargo.toml +0 -14
- package/sdk-core/fsm/src/lib.rs +0 -2
- package/sdk-core/sdk-core-protos/Cargo.toml +0 -37
- package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/VERSION +0 -1
- /package/sdk-core/{client → crates/client}/src/callback_based.rs +0 -0
- /package/sdk-core/{client → crates/client}/src/proxy.rs +0 -0
- /package/sdk-core/{client → crates/client}/src/replaceable.rs +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/build.rs +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/.github/workflows/build.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/.github/workflows/push-to-buf.yml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/CODEOWNERS +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/LICENSE +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/Makefile +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/README.md +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/buf.gen.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/buf.lock +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/buf.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/connectivityrule/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/identity/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/namespace/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/nexus/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/region/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/resource/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_cloud_upstream/temporal/api/cloud/usage/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/CODEOWNERS +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/workflows/ci.yml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/workflows/publish-docs.yml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/workflows/push-to-buf.yml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/workflows/trigger-api-go-delete-release.yml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/workflows/trigger-api-go-publish-release.yml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/.github/workflows/trigger-api-go-update.yml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/LICENSE +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/Makefile +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/README.md +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/api-linter.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/buf.gen.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/buf.lock +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/buf.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/api/annotations.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/api/http.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/protobuf/any.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/protobuf/descriptor.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/protobuf/duration.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/protobuf/empty.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/protobuf/struct.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/protobuf/timestamp.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/google/protobuf/wrappers.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/openapi/openapiv2.json +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/openapi/openapiv3.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/openapi/payload_description.txt +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/activity/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/batch/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/command/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/common/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/deployment/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/command_type.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/common.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/deployment.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/event_type.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/namespace.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/nexus.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/query.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/reset.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/schedule.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/update.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/enums/v1/workflow.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/errordetails/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/export/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/failure/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/filter/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/history/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/namespace/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/nexus/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/protocol/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/query/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/replication/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/rules/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/schedule/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/sdk/v1/enhanced_stack_trace.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/sdk/v1/task_complete_metadata.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/sdk/v1/user_metadata.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/sdk/v1/worker_config.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/update/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/version/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/worker/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/workflow/v1/message.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/google/rpc/status.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/grpc/health/v1/health.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/activity_result/activity_result.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/activity_task/activity_task.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/common/common.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/core_interface.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/external_data/external_data.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/nexus/nexus.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/testsrv_upstream/Makefile +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/testsrv_upstream/api-linter.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/testsrv_upstream/buf.yaml +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/testsrv_upstream/temporal/api/testservice/v1/request_response.proto +0 -0
- /package/sdk-core/{sdk-core-protos → crates/common}/protos/testsrv_upstream/temporal/api/testservice/v1/service.proto +0 -0
- /package/sdk-core/{sdk-core-protos/src → crates/common/src/protos}/constants.rs +0 -0
- /package/sdk-core/{sdk-core-protos/src → crates/common/src/protos}/task_token.rs +0 -0
- /package/sdk-core/{sdk-core-protos/src → crates/common/src/protos}/utilities.rs +0 -0
- /package/sdk-core/{fsm → crates/macros}/LICENSE.txt +0 -0
- /package/sdk-core/{sdk → crates/sdk}/src/app_data.rs +0 -0
- /package/sdk-core/{core → crates/sdk-core}/src/abstractions/take_cell.rs +0 -0
- /package/sdk-core/{core → crates/sdk-core}/src/test_help/mod.rs +0 -0
- /package/sdk-core/{core → crates/sdk-core}/src/worker/slot_supplier.rs +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/ends_empty_wft_complete.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/evict_while_la_running_no_interference-16_history.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/evict_while_la_running_no_interference-23_history.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/evict_while_la_running_no_interference-85_history.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/fail_wf_task.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/long_local_activity_with_update-0_history.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/long_local_activity_with_update-1_history.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/long_local_activity_with_update-2_history.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/long_local_activity_with_update-3_history.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/old_change_marker_format.bin +0 -0
- /package/sdk-core/{histories → crates/sdk-core/tests/histories}/timer_workflow_history.bin +0 -0
- /package/sdk-core/{tests → crates/sdk-core/tests}/integ_tests/workflow_tests/priority.rs +0 -0
- /package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/build.rs +0 -0
- /package/sdk-core/{core-c-bridge → crates/sdk-core-c-bridge}/src/random.rs +0 -0
- /package/sdk-core/{cargo-tokio-console.sh → etc/cargo-tokio-console.sh} +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
use convert_case::{Case, Casing};
|
|
2
|
+
use proc_macro2::TokenStream;
|
|
3
|
+
use quote::quote;
|
|
4
|
+
use syn::{DeriveInput, FieldsNamed};
|
|
5
|
+
|
|
6
|
+
pub fn derive_tryintojs_struct(input: &DeriveInput, data: &syn::DataStruct) -> TokenStream {
|
|
7
|
+
let struct_ident = &input.ident;
|
|
8
|
+
let generics = &input.generics;
|
|
9
|
+
let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
|
|
10
|
+
|
|
11
|
+
let field_conversions = if let syn::Fields::Named(ref fields) = data.fields {
|
|
12
|
+
field_conversions_for_named_fields(fields)
|
|
13
|
+
} else {
|
|
14
|
+
panic!("Only named fields are supported")
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
let expanded = quote! {
|
|
18
|
+
impl #impl_generics crate::helpers::TryIntoJs for #struct_ident #ty_generics #where_clause {
|
|
19
|
+
type Output = neon::types::JsObject;
|
|
20
|
+
|
|
21
|
+
fn try_into_js<'a>(self, cx: &mut impl neon::prelude::Context<'a>) -> neon::result::JsResult<'a, Self::Output> {
|
|
22
|
+
let obj = cx.empty_object();
|
|
23
|
+
#(#field_conversions)*
|
|
24
|
+
Ok(obj)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
TokenStream::from(expanded)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
pub fn derive_tryintojs_enum(input: &DeriveInput, data: &syn::DataEnum) -> TokenStream {
|
|
33
|
+
let enum_ident = &input.ident;
|
|
34
|
+
let generics = &input.generics;
|
|
35
|
+
let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
|
|
36
|
+
|
|
37
|
+
let variant_conversions = data.variants.iter().map(|v| {
|
|
38
|
+
let variant_ident = &v.ident;
|
|
39
|
+
let js_discriminant = variant_ident.to_string().to_case(Case::Camel);
|
|
40
|
+
|
|
41
|
+
match &v.fields {
|
|
42
|
+
syn::Fields::Unit => {
|
|
43
|
+
quote! {
|
|
44
|
+
#enum_ident::#variant_ident => {
|
|
45
|
+
let obj = cx.empty_object();
|
|
46
|
+
let type_str = cx.string(#js_discriminant);
|
|
47
|
+
obj.set(cx, "type", type_str)?;
|
|
48
|
+
obj
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
syn::Fields::Unnamed(fields) => {
|
|
53
|
+
if fields.unnamed.len() != 1 {
|
|
54
|
+
panic!("Enum variants with unnamed fields must have exactly one field");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
quote! {
|
|
58
|
+
#enum_ident::#variant_ident(inner) => {
|
|
59
|
+
let obj = cx.empty_object();
|
|
60
|
+
let type_str = cx.string(#js_discriminant);
|
|
61
|
+
obj.set(cx, "type", type_str)?;
|
|
62
|
+
|
|
63
|
+
let inner_js = inner.try_into_js(cx)?;
|
|
64
|
+
if inner_js.is_a::<neon::types::JsObject, _>(cx) {
|
|
65
|
+
// If inner is a JsObject, copy its properties to our object
|
|
66
|
+
let inner_obj = inner_js.downcast::<neon::types::JsObject, _>(cx).unwrap();
|
|
67
|
+
let prop_names = inner_obj.get_own_property_names(cx)?.to_vec(cx)?;
|
|
68
|
+
|
|
69
|
+
for key_handle in prop_names {
|
|
70
|
+
let value = inner_obj.get_value(cx, key_handle)?;
|
|
71
|
+
obj.set(cx, key_handle, value)?;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
obj
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
syn::Fields::Named(fields) => {
|
|
80
|
+
let field_names = fields.named.iter().map(|f| {
|
|
81
|
+
let field_ident = &f.ident;
|
|
82
|
+
let js_name = field_ident.as_ref().unwrap().to_string().to_case(Case::Camel);
|
|
83
|
+
(field_ident, js_name)
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
let pattern_fields = field_names.clone().map(|(field_ident, _)| {
|
|
87
|
+
quote! { #field_ident }
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
let field_sets = field_names.map(|(field_ident, js_name)| {
|
|
91
|
+
quote! {
|
|
92
|
+
let js_value = #field_ident.try_into_js(cx)?;
|
|
93
|
+
obj.set(cx, #js_name, js_value)?;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
quote! {
|
|
98
|
+
#enum_ident::#variant_ident { #(#pattern_fields),* } => {
|
|
99
|
+
let obj = cx.empty_object();
|
|
100
|
+
let type_str = cx.string(#js_discriminant);
|
|
101
|
+
obj.set(cx, "type", type_str)?;
|
|
102
|
+
|
|
103
|
+
#(#field_sets)*
|
|
104
|
+
|
|
105
|
+
obj
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
let expanded = quote! {
|
|
113
|
+
impl #impl_generics crate::helpers::TryIntoJs for #enum_ident #ty_generics #where_clause {
|
|
114
|
+
type Output = neon::types::JsObject;
|
|
115
|
+
|
|
116
|
+
fn try_into_js<'a>(self, cx: &mut impl neon::prelude::Context<'a>) -> neon::result::JsResult<'a, Self::Output> {
|
|
117
|
+
Ok(match self {
|
|
118
|
+
#(#variant_conversions),*
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
TokenStream::from(expanded)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
fn field_conversions_for_named_fields(
|
|
128
|
+
fields: &FieldsNamed,
|
|
129
|
+
) -> impl Iterator<Item = TokenStream> + '_ {
|
|
130
|
+
fields.named.iter().map(|f| {
|
|
131
|
+
let field_ident = f
|
|
132
|
+
.ident
|
|
133
|
+
.as_ref()
|
|
134
|
+
.expect("FieldsNamed.named must have an identifier");
|
|
135
|
+
let js_name = field_ident.to_string().to_case(Case::Camel);
|
|
136
|
+
|
|
137
|
+
// Ignore PhantomData fields
|
|
138
|
+
if let syn::Type::Path(path) = &f.ty {
|
|
139
|
+
if let Some(segment) = path.path.segments.last() {
|
|
140
|
+
if segment.ident == "PhantomData" {
|
|
141
|
+
return quote! {};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
quote! {
|
|
147
|
+
let js_value = self.#field_ident.try_into_js(cx)?;
|
|
148
|
+
obj.set(cx, #js_name, js_value)?;
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
mod derive_js_function;
|
|
2
|
+
mod derive_tryfromjs;
|
|
3
|
+
mod derive_tryintojs;
|
|
4
|
+
|
|
5
|
+
use derive_js_function::js_function_impl;
|
|
6
|
+
use derive_tryfromjs::{derive_tryfromjs_enum, derive_tryfromjs_struct};
|
|
7
|
+
use derive_tryintojs::{derive_tryintojs_enum, derive_tryintojs_struct};
|
|
8
|
+
use proc_macro::TokenStream;
|
|
9
|
+
use syn::{DeriveInput, parse_macro_input};
|
|
10
|
+
|
|
11
|
+
/// Procedural macro for defining bridge types with compile-time field name conversion
|
|
12
|
+
///
|
|
13
|
+
/// Note that enum types must all be defined on the JS side as objects with a `type` field which
|
|
14
|
+
/// is the kebab-case representation of the enum variant.
|
|
15
|
+
#[proc_macro_derive(TryFromJs)]
|
|
16
|
+
pub fn try_from_js(input: TokenStream) -> TokenStream {
|
|
17
|
+
let input = parse_macro_input!(input as DeriveInput);
|
|
18
|
+
|
|
19
|
+
match &input.data {
|
|
20
|
+
syn::Data::Struct(data) => derive_tryfromjs_struct(&input, data).into(),
|
|
21
|
+
syn::Data::Enum(data) => derive_tryfromjs_enum(&input, data).into(),
|
|
22
|
+
syn::Data::Union(_) => panic!("Unions are not supported"),
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// Procedural macro for defining bridge types with compile-time field name conversion
|
|
27
|
+
#[proc_macro_derive(TryIntoJs)]
|
|
28
|
+
pub fn try_into_js(input: TokenStream) -> TokenStream {
|
|
29
|
+
let input = parse_macro_input!(input as DeriveInput);
|
|
30
|
+
|
|
31
|
+
match &input.data {
|
|
32
|
+
syn::Data::Struct(data) => derive_tryintojs_struct(&input, data).into(),
|
|
33
|
+
syn::Data::Enum(data) => derive_tryintojs_enum(&input, data).into(),
|
|
34
|
+
syn::Data::Union(_) => panic!("Unions are not supported"),
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/// Generates a function that can be called from JavaScript with the given name
|
|
39
|
+
#[proc_macro_attribute]
|
|
40
|
+
pub fn js_function(attr: TokenStream, input: TokenStream) -> TokenStream {
|
|
41
|
+
js_function_impl(attr, input)
|
|
42
|
+
}
|
package/lib/native.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ type Option<T> = T | null;
|
|
|
34
34
|
* Marker for values that are transferred as JSON strings.
|
|
35
35
|
*/
|
|
36
36
|
export type JsonString<_T> = string;
|
|
37
|
-
export declare function newRuntime(
|
|
37
|
+
export declare function newRuntime(runtimeOptions: RuntimeOptions): Runtime;
|
|
38
38
|
export declare function runtimeShutdown(runtime: Runtime): void;
|
|
39
39
|
export interface Runtime {
|
|
40
40
|
type: 'runtime';
|
|
@@ -43,6 +43,7 @@ export type RuntimeOptions = {
|
|
|
43
43
|
logExporter: LogExporterOptions;
|
|
44
44
|
telemetry: TelemetryOptions;
|
|
45
45
|
metricsExporter: MetricExporterOptions;
|
|
46
|
+
workerHeartbeatIntervalMillis: Option<number>;
|
|
46
47
|
};
|
|
47
48
|
export type TelemetryOptions = {
|
|
48
49
|
attachServiceName: boolean;
|
|
@@ -92,18 +93,18 @@ export interface ClientOptions {
|
|
|
92
93
|
targetUrl: string;
|
|
93
94
|
clientName: string;
|
|
94
95
|
clientVersion: string;
|
|
95
|
-
tls: Option<
|
|
96
|
+
tls: Option<TlsOptions>;
|
|
96
97
|
httpConnectProxy: Option<HttpConnectProxy>;
|
|
97
98
|
headers: Option<Record<string, MetadataValue>>;
|
|
98
99
|
apiKey: Option<string>;
|
|
99
100
|
disableErrorCodeMetricTags: boolean;
|
|
100
101
|
}
|
|
101
|
-
export interface
|
|
102
|
+
export interface TlsOptions {
|
|
102
103
|
domain: Option<string>;
|
|
103
104
|
serverRootCaCert: Option<Buffer>;
|
|
104
|
-
|
|
105
|
+
clientTlsOptions: Option<TlsOptionsClientCertPair>;
|
|
105
106
|
}
|
|
106
|
-
export interface
|
|
107
|
+
export interface TlsOptionsClientCertPair {
|
|
107
108
|
clientCert: Buffer;
|
|
108
109
|
clientPrivateKey: Buffer;
|
|
109
110
|
}
|
|
@@ -158,7 +159,12 @@ export interface WorkerOptions {
|
|
|
158
159
|
workflowTaskPollerBehavior: PollerBehavior;
|
|
159
160
|
activityTaskPollerBehavior: PollerBehavior;
|
|
160
161
|
nexusTaskPollerBehavior: PollerBehavior;
|
|
161
|
-
|
|
162
|
+
taskTypes: {
|
|
163
|
+
enableWorkflows: boolean;
|
|
164
|
+
enableLocalActivities: boolean;
|
|
165
|
+
enableRemoteActivities: boolean;
|
|
166
|
+
enableNexus: boolean;
|
|
167
|
+
};
|
|
162
168
|
stickyQueueScheduleToStartTimeout: number;
|
|
163
169
|
maxCachedWorkflows: number;
|
|
164
170
|
maxHeartbeatThrottleInterval: number;
|
|
@@ -166,6 +172,7 @@ export interface WorkerOptions {
|
|
|
166
172
|
maxTaskQueueActivitiesPerSecond: Option<number>;
|
|
167
173
|
maxActivitiesPerSecond: Option<number>;
|
|
168
174
|
shutdownGraceTime: number;
|
|
175
|
+
plugins: string[];
|
|
169
176
|
}
|
|
170
177
|
export type PollerBehavior = {
|
|
171
178
|
type: 'simple-maximum';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalio/core-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Temporal.io SDK Core<>Node bridge",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build-rust": "node ./scripts/build.js --force",
|
|
9
|
-
"build": "
|
|
10
|
-
"build-rust-release": "
|
|
9
|
+
"build": "pnpm run build-rust",
|
|
10
|
+
"build-rust-release": "pnpm run build-rust --release",
|
|
11
11
|
"install": "node ./scripts/build.js",
|
|
12
12
|
"format": "cargo fmt",
|
|
13
13
|
"lint": "cargo clippy --fix --allow-staged",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@grpc/grpc-js": "^1.12.4",
|
|
26
|
-
"@temporalio/common": "1.
|
|
26
|
+
"@temporalio/common": "1.14.0",
|
|
27
27
|
"arg": "^5.0.2",
|
|
28
28
|
"cargo-cp-artifact": "^0.1.8",
|
|
29
29
|
"which": "^4.0.0"
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"node": ">= 18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
|
+
"bridge-macros",
|
|
44
45
|
"scripts",
|
|
45
46
|
"src",
|
|
46
47
|
"releases",
|
|
@@ -56,5 +57,5 @@
|
|
|
56
57
|
"publishConfig": {
|
|
57
58
|
"access": "public"
|
|
58
59
|
},
|
|
59
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "eb428ac36568b48be67fdba662c38631867b932d"
|
|
60
61
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
[env]
|
|
2
2
|
# This temporarily overrides the version of the CLI used for integration tests, locally and in CI
|
|
3
|
-
CLI_VERSION_OVERRIDE = "v1.4.1-cloud-v1-29-0-139-2.0"
|
|
3
|
+
#CLI_VERSION_OVERRIDE = "v1.4.1-cloud-v1-29-0-139-2.0"
|
|
4
4
|
|
|
5
5
|
[alias]
|
|
6
6
|
# Not sure why --all-features doesn't work
|
|
7
7
|
integ-test = [
|
|
8
8
|
"test",
|
|
9
9
|
"--features",
|
|
10
|
-
"
|
|
10
|
+
"temporalio-common/serde_serialize",
|
|
11
11
|
"--features",
|
|
12
12
|
"test-utilities",
|
|
13
13
|
"--features",
|
|
14
14
|
"ephemeral-server",
|
|
15
15
|
"--package",
|
|
16
|
-
"
|
|
16
|
+
"temporalio-sdk-core",
|
|
17
17
|
"--test",
|
|
18
18
|
"integ_runner",
|
|
19
19
|
"--",
|
|
@@ -50,6 +50,12 @@ lint-fix = [
|
|
|
50
50
|
"heavy_tests",
|
|
51
51
|
"--test",
|
|
52
52
|
"manual_tests",
|
|
53
|
+
"--test",
|
|
54
|
+
"cloud_tests",
|
|
55
|
+
"--test",
|
|
56
|
+
"integ_runner",
|
|
57
|
+
"--test",
|
|
58
|
+
"global_metric_tests",
|
|
53
59
|
"--fix",
|
|
54
60
|
"--allow-dirty",
|
|
55
61
|
]
|
|
@@ -6,6 +6,10 @@ on: # rebuild any PRs and main branch changes
|
|
|
6
6
|
branches:
|
|
7
7
|
- master
|
|
8
8
|
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
actions: write
|
|
12
|
+
|
|
9
13
|
concurrency:
|
|
10
14
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
11
15
|
cancel-in-progress: true
|
|
@@ -32,6 +36,8 @@ jobs:
|
|
|
32
36
|
- uses: Swatinem/rust-cache@v2
|
|
33
37
|
- run: cargo fmt --all --check
|
|
34
38
|
- run: cargo doc --workspace --all-features --no-deps
|
|
39
|
+
env:
|
|
40
|
+
RUSTDOCFLAGS: "-D warnings"
|
|
35
41
|
- run: cargo lint
|
|
36
42
|
- run: cargo test-lint
|
|
37
43
|
- run: cargo check
|
|
@@ -39,7 +45,7 @@ jobs:
|
|
|
39
45
|
|
|
40
46
|
test:
|
|
41
47
|
name: Unit Tests
|
|
42
|
-
timeout-minutes:
|
|
48
|
+
timeout-minutes: 15
|
|
43
49
|
strategy:
|
|
44
50
|
fail-fast: false
|
|
45
51
|
matrix:
|
|
@@ -76,6 +82,18 @@ jobs:
|
|
|
76
82
|
core.exportVariable('RUSTFLAGS', '-Csymbol-mangling-version=v0');
|
|
77
83
|
- uses: Swatinem/rust-cache@v2
|
|
78
84
|
- run: cargo test -- --include-ignored --nocapture
|
|
85
|
+
- name: Find test executable for cgroup tests
|
|
86
|
+
id: find-cgroup-test
|
|
87
|
+
if: runner.os == 'Linux' && runner.arch == 'X64'
|
|
88
|
+
run: |
|
|
89
|
+
test_executable=$(cargo build --tests --message-format json | jq -r 'select(.profile?.test == true and .target?.name == "temporalio_sdk_core" and .executable) | .executable')
|
|
90
|
+
cp $test_executable ./core-tests
|
|
91
|
+
- name: Upload cgroup test executable
|
|
92
|
+
uses: actions/upload-artifact@v4
|
|
93
|
+
if: runner.os == 'Linux' && runner.arch == 'X64'
|
|
94
|
+
with:
|
|
95
|
+
name: cgroup-tests-linux-x86_64
|
|
96
|
+
path: ./core-tests
|
|
79
97
|
- uses: actions/upload-artifact@v4
|
|
80
98
|
with:
|
|
81
99
|
name: coverage-report
|
|
@@ -85,9 +103,28 @@ jobs:
|
|
|
85
103
|
name: state-machine-coverage
|
|
86
104
|
path: machine_coverage/
|
|
87
105
|
|
|
106
|
+
cgroup-tests:
|
|
107
|
+
name: cgroup tests
|
|
108
|
+
needs: test
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
container:
|
|
111
|
+
image: ubuntu
|
|
112
|
+
options: --cpus=1 --memory=512m
|
|
113
|
+
env:
|
|
114
|
+
CGROUP_TESTS_ENABLED: true
|
|
115
|
+
steps:
|
|
116
|
+
- name: Download cgroup test executable
|
|
117
|
+
uses: actions/download-artifact@v5
|
|
118
|
+
with:
|
|
119
|
+
name: cgroup-tests-linux-x86_64
|
|
120
|
+
- name: Run tests
|
|
121
|
+
run: |
|
|
122
|
+
chmod +x ./core-tests
|
|
123
|
+
./core-tests cgroup_ --nocapture
|
|
124
|
+
|
|
88
125
|
integ-tests:
|
|
89
126
|
name: Integ tests
|
|
90
|
-
timeout-minutes:
|
|
127
|
+
timeout-minutes: 25
|
|
91
128
|
strategy:
|
|
92
129
|
fail-fast: false
|
|
93
130
|
matrix:
|
|
@@ -174,7 +211,7 @@ jobs:
|
|
|
174
211
|
- name: Start container for otel-collector and prometheus
|
|
175
212
|
uses: hoverkraft-tech/compose-action@v2.0.1
|
|
176
213
|
with:
|
|
177
|
-
compose-file: ./docker/docker-compose-ci.yaml
|
|
214
|
+
compose-file: ./etc/docker/docker-compose-ci.yaml
|
|
178
215
|
- uses: Swatinem/rust-cache@v2
|
|
179
216
|
- run: cargo integ-test docker_
|
|
180
217
|
|
|
@@ -194,10 +231,10 @@ jobs:
|
|
|
194
231
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
195
232
|
|
|
196
233
|
- name: Build crate as static library
|
|
197
|
-
run: cargo rustc --package
|
|
234
|
+
run: cargo rustc --package temporalio-sdk-core-c-bridge --features xz2-static -- --crate-type=staticlib
|
|
198
235
|
|
|
199
236
|
- name: Build C test program
|
|
200
|
-
run: gcc -I./core-c-bridge/include tests/c_bridge_smoke_test.c target/debug/deps/
|
|
237
|
+
run: gcc -I./crates/sdk-core-c-bridge/include crates/sdk-core/tests/c_bridge_smoke_test.c target/debug/deps/libtemporalio_sdk_core_c_bridge.a -lpthread -ldl -lm -o test
|
|
201
238
|
|
|
202
239
|
- name: Run C test program
|
|
203
240
|
run: ./test
|
package/sdk-core/AGENTS.md
CHANGED
|
@@ -5,15 +5,15 @@ document as your quick reference when submitting pull requests.
|
|
|
5
5
|
|
|
6
6
|
## Where Things Are
|
|
7
7
|
|
|
8
|
-
- `
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `core-
|
|
12
|
-
- `
|
|
13
|
-
- `sdk
|
|
14
|
-
- `
|
|
15
|
-
- `
|
|
16
|
-
- `tests/` – integration, heavy, and manual tests
|
|
8
|
+
- `crates` - All crates in the workspace.
|
|
9
|
+
- `crates/core/` – implementation of the core SDK
|
|
10
|
+
- `crates/client/` – clients for communicating with Temporal clusters
|
|
11
|
+
- `crates/core-api/` – API definitions exposed by core
|
|
12
|
+
- `crates/core-c-bridge/` – C interface for core
|
|
13
|
+
- `crates/sdk/` – pre-alpha Rust SDK built on top of core (used mainly for tests)
|
|
14
|
+
- `crates/sdk-core-protos/` – protobuf definitions shared across crates
|
|
15
|
+
- `crates/fsm/` – state machine implementation and macros
|
|
16
|
+
- `crates/core/tests/` – integration, heavy, and manual tests
|
|
17
17
|
- `arch_docs/` – architectural design documents
|
|
18
18
|
- Contributor guide: `README.md`
|
|
19
19
|
- `target/` - This contains compiled files. You never need to look in here.
|
|
@@ -21,13 +21,11 @@ document as your quick reference when submitting pull requests.
|
|
|
21
21
|
## Repo Specific Utilities
|
|
22
22
|
|
|
23
23
|
- `.cargo/config.toml` defines useful cargo aliases:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- `
|
|
28
|
-
- `
|
|
29
|
-
- `.cargo/multi-worker-manual-test` – helper script for spawning multiple workers during manual
|
|
30
|
-
testing
|
|
24
|
+
- `cargo lint` – run clippy on workspace crates
|
|
25
|
+
- `cargo test-lint` – run clippy on tests
|
|
26
|
+
- `cargo integ-test` – run the integration test runner
|
|
27
|
+
- `etc` - Various helper scripts and configuration
|
|
28
|
+
- `etc/docker` - Docker compose files to help with CI or more complex local testing
|
|
31
29
|
|
|
32
30
|
## Building and Testing
|
|
33
31
|
|
|
@@ -75,6 +73,6 @@ Reviewers will look for:
|
|
|
75
73
|
## Notes
|
|
76
74
|
|
|
77
75
|
- Fetch workflow histories with `cargo run --bin histfetch <workflow_id> [run_id]` (binary lives in
|
|
78
|
-
`
|
|
79
|
-
- Protobuf files under `sdk-core-protos/protos/api_upstream` are a git subtree; see
|
|
80
|
-
update instructions.
|
|
76
|
+
`crates/core/src/histfetch.rs`).
|
|
77
|
+
- Protobuf files under `crates/sdk-core-protos/protos/api_upstream` are a git subtree; see
|
|
78
|
+
`README.md` for update instructions.
|
package/sdk-core/Cargo.toml
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
[workspace]
|
|
2
2
|
members = [
|
|
3
|
-
"core",
|
|
4
|
-
"client",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"sdk
|
|
8
|
-
"sdk",
|
|
9
|
-
"core-c-bridge",
|
|
3
|
+
"crates/sdk-core",
|
|
4
|
+
"crates/client",
|
|
5
|
+
"crates/common",
|
|
6
|
+
"crates/macros",
|
|
7
|
+
"crates/sdk",
|
|
8
|
+
"crates/sdk-core-c-bridge",
|
|
10
9
|
]
|
|
11
10
|
resolver = "2"
|
|
12
11
|
|
package/sdk-core/README.md
CHANGED
|
@@ -26,18 +26,16 @@ installed to build Core.
|
|
|
26
26
|
|
|
27
27
|
This repo is composed of multiple crates:
|
|
28
28
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
- rustfsm `./fsm` - Implements a procedural macro used by core for defining state machines
|
|
36
|
-
(contains subcrates). It is Temporal-agnostic.
|
|
29
|
+
- temporalio-client `./crates/client` - Defines client(s) for interacting with the Temporal gRPC service.
|
|
30
|
+
- temporalio-common `./crates/common` - Common code & protobuf definitions
|
|
31
|
+
- temporalio-sdk-core `./crates/core` - The Core implementation.
|
|
32
|
+
- temporalio-sdk-core-c-bridge `./crates/core-c-bridge` - Provides C bindings for Core.
|
|
33
|
+
- temporalio-macros `./crates/macros` - Implements procedural macros used by core and the SDK.
|
|
34
|
+
- temporalio-sdk `./crates/sdk` - A (currently prototype) Rust SDK built on top of Core. Used for testing.
|
|
37
35
|
|
|
38
36
|
Visualized (dev dependencies are in blue):
|
|
39
37
|
|
|
40
|
-

|
|
41
39
|
|
|
42
40
|
All the following commands are enforced for each pull request:
|
|
43
41
|
|
|
@@ -64,8 +62,8 @@ To format all code run:
|
|
|
64
62
|
## Linting
|
|
65
63
|
|
|
66
64
|
We are using [clippy](https://github.com/rust-lang/rust-clippy) for linting.
|
|
67
|
-
|
|
68
|
-
`cargo
|
|
65
|
+
We have a couple aliases for linting that make sure various targets are hit:
|
|
66
|
+
`cargo lint` and `cargo test-lint`.
|
|
69
67
|
|
|
70
68
|
## Debugging
|
|
71
69
|
|
|
@@ -79,10 +77,10 @@ crate::telemetry::telemetry_init_fallback();
|
|
|
79
77
|
|
|
80
78
|
The passed in options to initialization can be customized to export to an OTel collector, etc.
|
|
81
79
|
|
|
82
|
-
To run integ tests with OTel collection on, you can use `integ-with-otel.sh`. You will want to
|
|
83
|
-
sure you are running the collector via docker, which can be done like so:
|
|
80
|
+
To run integ tests with OTel collection on, you can use `etc/integ-with-otel.sh`. You will want to
|
|
81
|
+
make sure you are running the collector via docker, which can be done like so:
|
|
84
82
|
|
|
85
|
-
`docker-compose -f docker/docker-compose.yaml -f docker/docker-compose-telem.yaml up`
|
|
83
|
+
`docker-compose -f etc/docker/docker-compose.yaml -f etc/docker/docker-compose-telem.yaml up`
|
|
86
84
|
|
|
87
85
|
If you are working on a language SDK, you are expected to initialize tracing early in your `main`
|
|
88
86
|
equivalent.
|
|
@@ -137,4 +135,3 @@ pre-alpha in terms of its API surface. Since it's still using Core underneath, i
|
|
|
137
135
|
functional. We do not currently have any firm plans to productionize this SDK. If you want to write
|
|
138
136
|
workflows and activities in Rust, feel free to use it - but be aware that the API may change at any
|
|
139
137
|
time without warning and we do not provide any support guarantees.
|
|
140
|
-
|