Skip to content

Rust Reference

rustdoc reference for the project's Rust crates, private items included: the Rust counterpart of the API Reference. Use it for each crate's types, functions and their contracts; use the Markdown design documents for architecture, rationale and workflows. Every item is documented (each crate warns on missing_docs and clippy::missing_docs_in_private_items), and the crates link to one another and share one search.

Libraries

Crate Source What it is
tagcore host/libraries/tagcore-rs Talking to tag firmware monitors through a tag base: the Rust port of tagcore's Tag, the protobuf messages, ConfigShape
tagcore-c-sys host/libraries/tagcore-c-sys Links tagcore_c, the C interface to the C++ host libraries, and declares its functions; the one crate that does, so the wrappers below can be used together
taglogwriter host/libraries/taglogwriter-rs Writing tag SQLite logs through the C++ writer in tagcore_c
calibsession host/libraries/calibsession-rs The magnetometer and accelerometer calibration session and the compass display angles, through the C++ core in tagcore_c
sensorviz-session host/libraries/sensorviz-session-rs Opening and viewing tag logs through sensorViz's C++ core in tagcore_c: the catalog, view, plot spec, envelopes, hover text, transforms and preferences
tagprobe host/libraries/tagprobe-rs Programming tags through the tag bases with probe-rs

Applications

The toolkit-free core of each Rust application: its model, its engine and the rules behind its window. The Tauri shell beside each (app/) is not in the reference; it is a page that forwards the page's commands to the engine, and its own module documentation describes it.

Crate Source What it is
tagprogram_core host/applications/tagprogram-rs/core Tag Programmer: programming, testing and recording tags
tagmonitor_core host/applications/tagmonitor-rs/core Tag Monitor: the port of qtmonitor's core -- attach, check, configure, start and download tags
tagcalibrate_core host/applications/tagcalibrate-rs/core Tag Calibrator: the port of qtcalibrate's behaviour, over the C++ calibration session
sensorviz_core host/applications/sensorviz-rs/core sensorViz: the port of the Qt sensorviz's behaviour, over sensorViz's C++ core

Command-line tools

Crate Source What it is
tag_tools host/commandline-rs The options, logging and base selection the tools share
tag_dwnld, tag_info, tag_start, tag_stop, tag_reset, tag_test, tag_cal, tag_cal_write, tag_peek host/commandline-rs/src/bin The Rust tag tools, one page each
tag_attach_cycle, tag_monitor_test, tag_side_channel_check, tag_test_example, qtmonitor_fixture_capture host/commandline-rs/src/bin Bench and test tools

Building it

The rust_docs target runs cargo doc for each crate (the list is DEVELOPER_RUST_DOCS in the top-level CMakeLists.txt), and developer_docs runs it after MkDocs, as it runs Doxygen. It needs cargo; without it the portal is built without this reference and these links do not resolve. Nothing is linked, so the crates that link libtagcore_c do not need the library to be built first.

cmake --build <build-dir> --target rust_docs        # the reference alone
cmake --build <build-dir> --target developer_docs   # the whole portal

To check one crate's documentation as you change it, from its directory:

cargo clippy --all-targets 2>&1 | grep -c "missing documentation"   # expect 0
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --document-private-items