Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Crate map

Verified · no code on this page · docs-verify

The badge reports the whole docs-verify suite, not this chapter alone.

Spvirit is seven crates in one workspace. They are published separately, so you depend on the layer you need and nothing above it. Six of them form the layered stack below; the seventh, spvirit-calc, stands apart.

The layering

graph TD
    types[spvirit-types]
    codec[spvirit-codec]
    client[spvirit-client]
    server[spvirit-server]
    tools[spvirit-tools]
    py[spvirit-py]

    codec --> types
    client --> codec
    client --> types
    server --> codec
    server --> types
    tools --> client
    tools --> server
    tools --> codec
    tools --> types
    py --> client
    py --> server
    py --> codec
    py --> types

The direction is strict and there are no cycles. spvirit-client and spvirit-server do not depend on each other — the only thing they share is the codec and the type vocabulary underneath it.

What each one is for

CrateDepends onYou want it whenAPI docs
spvirit-typesYou need the Normative Type structs (NtScalar, NtTable, NtNdArray, NtEnum, ScalarValue) without any I/O. Pure data and validation.docs.rs
spvirit-codecspvirit-typesYou are encoding or decoding PVAccess frames yourself — a proxy, an analyser, a test harness.docs.rs
spvirit-clientspvirit-codecYou are reading, writing, or monitoring PVs from Rust.docs.rs
spvirit-serverspvirit-codecYou are serving PVs: a soft IOC, a simulator, a gateway.docs.rs
spvirit-toolsclient + serverYou want the sp* command-line programs. Also usable as a library, but it exists mainly to ship binaries.docs.rs
spvirit-pyclient + serverThe spvirit Python module. A PyO3 extension, not a pure-Python package.Python API

A seventh crate, spvirit-calc (docs.rs), implements the EPICS CALC expression language. It is a workspace member and is published alongside the rest, but nothing in the diagram above depends on it — it stands alone, and you add it explicitly if you want it.

Incomplete. spvirit-calc is a work in progress. Its conformance corpus (spvirit-calc/tests/base_corpus.rs, transcribed from EPICS Base's epicsCalcTest.cpp) still has failing cases in the parser's conditional/: error classification, so that corpus test is currently commented out. The per-module unit tests pass, but treat the crate as unfinished. See Known gaps.

This book is the tutorial; the docs.rs pages are the exhaustive per-item reference. They are generated from the same source tree and versioned with each release, so latest always matches the newest published version.

Versions

All are released together from the workspace, so their version numbers move in step. spvirit-py is published to PyPI rather than crates.io and carries its own version.

Feature flags

Only spvirit-tools is feature-gated:

FeatureDefaultGates
clientyesspget, spput, spmonitor, spinfo, splist, spsine, spget_compare
serveryesspserver, spdodeca
tuiyesspexplore, spsearch; also required (with server) by sptable

All three are on by default. A build with --no-default-features produces no binaries at all — a fact worth knowing before you spend ten minutes wondering where they went. See Installation.

spvirit-types, spvirit-codec, spvirit-client and spvirit-server declare no features.

Where to read further

The Developer guide walks each crate's internals with file-and-line citations — Types and Codec, Server, Client and Tools, Python Bindings.