Skip to content

Add non-spawning server task APIs#188

Merged
jadamcrain merged 1 commit into
mainfrom
issue-187-server-tasks
Jul 19, 2026
Merged

Add non-spawning server task APIs#188
jadamcrain merged 1 commit into
mainfrom
issue-187-server-tasks

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

Summary

  • add a public ServerTask<T> wrapper that hides TCP/TLS and RTU implementations
  • add non-spawning create APIs for TCP, RTU, TLS, and TLS with authorization
  • refactor existing spawn APIs to delegate to the corresponding create paths
  • allow TCP and TLS callers to supply pre-bound listeners and control task spawning and instrumentation

Motivation

Server APIs currently bind and spawn internally, preventing callers from completing all fallible startup work before tasks begin. The new APIs mirror the existing non-spawning client task pattern: callers receive a handle and a named task whose run() future they can spawn on the runtime of their choice.

RTU task creation performs no serial I/O; the port is opened only after ServerTask::run() begins.

Validation

  • cargo test -p rodbus
  • cargo test -p integration
  • cargo clippy -p rodbus -p integration -- -D warnings
  • cargo doc -p rodbus --no-deps
  • supported feature checks for minimal, serial, TLS ring, TLS AWS-LC, and serialization workspace configurations
  • formatting and diff checks

Closes #187

@jadamcrain
jadamcrain marked this pull request as ready for review July 19, 2026 23:47
@jadamcrain
jadamcrain merged commit e31cfd3 into main Jul 19, 2026
29 checks passed
@jadamcrain
jadamcrain deleted the issue-187-server-tasks branch July 19, 2026 23:48
jadamcrain added a commit that referenced this pull request Jul 20, 2026
Milestone to publish only the `rodbus` crate to crates.io for the
non-spawning server task APIs (#188). There are no FFI changes, so this
milestone is not pushed to Maven/NuGet/docs.

Full lockstep version bump 1.5.0 -> 1.6.0-M1 across all crates, FFI
binding build files, and the guide. The lockstep bump is required even
for a crates.io-only publish: the FFI layer asserts the generated
bindings' expected version (rodbus-schema, ffi/rodbus-schema/src/lib.rs)
against the native library's runtime version (rodbus::VERSION, via
ffi/rodbus-ffi/src/lib.rs), so bumping rodbus alone fails the binding
tests in CI.

Deliberately NOT bumped:
- Lockfiles (Cargo.lock, guide/package-lock.json) regenerate themselves.
- SBOM *.cdx.json snapshots are left at 1.5.0 (they carry a colliding
  lazy_static@1.5.0, don't affect CI or the crates.io publish, and are
  regenerated at the next tagged release).

Release process: this does NOT use the tag-driven pipeline (a tag fires
all release jobs across every ecosystem). After merge, publish manually
from main with `cargo publish -p rodbus`; no git tag is pushed. Binding
versions therefore read 1.6.0-M1 in source but stay published at 1.5.0
until the 1.6.0 final re-syncs everything.
jadamcrain added a commit that referenced this pull request Jul 20, 2026
* Release rodbus 1.6.0-M1 (crates.io only)

Milestone to publish only the `rodbus` crate to crates.io for the
non-spawning server task APIs (#188). There are no FFI changes, so this
milestone is not pushed to Maven/NuGet/docs.

Full lockstep version bump 1.5.0 -> 1.6.0-M1 across all crates, FFI
binding build files, and the guide. The lockstep bump is required even
for a crates.io-only publish: the FFI layer asserts the generated
bindings' expected version (rodbus-schema, ffi/rodbus-schema/src/lib.rs)
against the native library's runtime version (rodbus::VERSION, via
ffi/rodbus-ffi/src/lib.rs), so bumping rodbus alone fails the binding
tests in CI.

Deliberately NOT bumped:
- Lockfiles (Cargo.lock, guide/package-lock.json) regenerate themselves.
- SBOM *.cdx.json snapshots are left at 1.5.0 (they carry a colliding
  lazy_static@1.5.0, don't affect CI or the crates.io publish, and are
  regenerated at the next tagged release).

Release process: this does NOT use the tag-driven pipeline (a tag fires
all release jobs across every ecosystem). After merge, publish manually
from main with `cargo publish -p rodbus`; no git tag is pushed. Binding
versions therefore read 1.6.0-M1 in source but stay published at 1.5.0
until the 1.6.0 final re-syncs everything.

* Stop tracking generated CycloneDX SBOMs

The *.cdx.json files are build artifacts regenerated by cargo-cyclonedx
during CI (the packaging job) and local runs; nothing consumes the
committed copies as input. Being under version control, they drifted
stale (left at 1.5.0, carrying a colliding lazy_static@1.5.0) and added
noise to release bumps. Remove them from the index and gitignore the
pattern so they stay out.
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.

Non-spawning TCP server API under an unstable feature flag

1 participant