Expand description
Serving the TestStand™ Engine to other processes.
The engine is a single-threaded-apartment COM object: the wrappers in
rs_teststand are deliberately neither Send nor Sync, so one
thread owns the engine and no other may touch it. A user interface is the
opposite, its own thread, its own event loop, often its own process, and
often not even the same language.
This crate is the seam between the two. Nothing that crosses it is a COM reference; what crosses is data:
MessageEvent, one engine message flattened into something sendable, including the object payload, serialized throughrs-teststand-serde.Command, what a user interface asks the host to do.Response, the host’s answer to one command.
Those three types are shared by every transport, so a front end written against one can move to another without its message handling changing:
rs-teststand-websocket, bidirectional, framed by the protocol, and what a browser or a modern panel should use. Start here.transport::line, one JSON object per line over raw TCP, CRLF-framed, for a script or an older tool that speaks nothing else.
EngineHost is a different answer to a different question: it gives the
engine a thread and lets many callers submit closures to it. Use it when the
work is in-process; use a transport when the other side is not.
This is an addition to the binding, not part of it: rs_teststand
carries no async runtime and no transport, and a caller driving the engine
in-process never pays for one.
Re-exports§
pub use ack::Ack;pub use ack::AckState;pub use ack::CODE_FAILED;pub use ack::CODE_OK;pub use error::Error;pub use event::MessageEvent;pub use event::PayloadPolicy;pub use host::EngineHost;pub use response::Response;pub use transport::line::LineSink;pub use transport::line::LineSource;pub use watch::ClientTimeout;pub use watch::ClientWatch;pub use watch::WatchState;
Modules§
- ack
- A fixed-shape acknowledgement for every command.
- error
- What can go wrong when the engine lives on someone else’s thread.
- event
- The wire type: one engine message, flattened into data.
- host
- Owning the engine on its own thread so many callers can share it.
- response
- What the host answers a
Commandwith. - transport
- Moving events and commands between a host and whatever is watching it.
- watch
- Noticing that nobody is watching any more.
Enums§
- Command
- A request from a front end, addressed to the host that owns the engine.
- Execution
Control - What to do to a running execution.