Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ This is a workspace of three crates released together: **rsplot** (the plotting
library), **rsdm** (a PyDM-style EPICS display layer built on rsplot), and
**adl2rsdm** (a MEDM `.adl` → RsDM-Rust-source converter).

## [0.5.4] - 2026-07-16

A documentation-only patch release. No code, API, or behaviour changes.

### Added

- **`rsdm` and `adl2rsdm` now carry a README**, which crates.io renders on each
crate's page. Both crates previously shipped without a `readme` field or a
README file, so their crates.io pages showed nothing while `rsplot`'s
rendered normally. crates.io bakes the README per published version, so this
is why a new release was cut rather than an edit to 0.5.3.

## [0.5.3] - 2026-07-10

A regression release. A workspace-wide upstream-parity audit (silx / PyDM /
Expand Down Expand Up @@ -492,7 +504,8 @@ instead of Qt `.ui` XML.
- rsplot is now the root of a three-crate workspace; `rsdm` reaches egui/wgpu
through `rsplot::egui` to keep a single egui/wgpu in the tree.

[Unreleased]: https://github.com/physwkim/rsplot/compare/v0.5.3...HEAD
[Unreleased]: https://github.com/physwkim/rsplot/compare/v0.5.4...HEAD
[0.5.4]: https://github.com/physwkim/rsplot/compare/v0.5.3...v0.5.4
[0.5.3]: https://github.com/physwkim/rsplot/compare/v0.5.2...v0.5.3
[0.5.2]: https://github.com/physwkim/rsplot/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/physwkim/rsplot/compare/v0.5.0...v0.5.1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsplot"
version = "0.5.3"
version = "0.5.4"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion adl2rsdm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "adl2rsdm"
version = "0.5.3"
version = "0.5.4"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
description = "Convert MEDM .adl screen files to RsDM (Rust) display modules"
repository = "https://github.com/physwkim/rsplot"
readme = "README.md"
# The `local_panel` example `include!`s its committed generated screen
# (`examples/local_panel_screen.rs`); that file is converter OUTPUT, not a target.
# Disable example autodiscovery so Cargo does not treat it as a second example
Expand Down
52 changes: 52 additions & 0 deletions adl2rsdm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# adl2rsdm

**Convert MEDM `.adl` screen files to [RsDM](https://crates.io/crates/rsdm) (Rust) display modules.**

`adl2rsdm` mirrors the structure of
[adl2pydm](https://github.com/BCDA-APS/adl2pydm) (which converts MEDM `.adl`
screens to PyDM `.ui` files) but targets **RsDM**: it parses an `.adl` file
into an in-memory widget tree and emits **Rust source** that constructs the
equivalent `rsdm` widgets at their MEDM geometry.

RsDM has no runtime display loader — RsDM screens are programmatic Rust structs
— so the faithful analogue of "PyDM loads a generated `.ui`" is "the generated
Rust is compiled into a RsDM app". A side benefit is that the generated screen
can be *compile-verified* against the real `rsdm` widget APIs, a fidelity check
`adl2pydm` cannot perform against Qt.

License: MIT OR Apache-2.0.

---

## Pipeline

The pipeline mirrors `adl2pydm`'s stages:

- **`adl_parser`** — block-structured `.adl` parser producing a widget-tree IR
(port of `adl2pydm/adl_parser.py`). Pure and headlessly testable.
- **`symbols`** — the MEDM-widget → RsDM-widget map plus each widget's draw
category (port of `adl2pydm/symbols.py`).
- **`codegen`** — walks the IR and emits Rust source, one emitter per MEDM
widget type (the analogue of `adl2pydm/output_handler.py`).
- **`convert`** — the recursive driver: converts a root `.adl` plus the
transitive closure of its related-display targets into one source file, so
clicking a related-display button *opens* the converted child screen (MEDM
`relatedDisplayCreateNewDisplay`).

## Usage

```sh
cargo run -p adl2rsdm -- path/to/screen.adl -o src/screen.rs
```

The emitted module builds the screen against `rsdm` + `rsplot`; drop it into a
RsDM app and compile.

## License

Licensed under either of

- Apache License, Version 2.0
- MIT license

at your option.
5 changes: 3 additions & 2 deletions rsdm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "rsdm"
version = "0.5.3"
version = "0.5.4"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
description = "PyDM-style EPICS display widgets and data engine, built on rsplot"
repository = "https://github.com/physwkim/rsplot"
readme = "README.md"

# `rsdm` ports PyDM's core engine + widgets (Python/Qt EPICS display manager)
# onto rsplot's egui/wgpu plotting. egui/egui-wgpu are reached through rsplot's
Expand Down Expand Up @@ -53,7 +54,7 @@ calc = ["dep:evalexpr", "dep:epics-base-rs"]
# `version` (alongside `path`) is required so `cargo publish` records a
# crates.io dependency on the published rsplot; the path is used for local
# workspace builds. Keep this in lockstep with rsplot's version.
rsplot = { path = "..", version = "0.5.3" }
rsplot = { path = "..", version = "0.5.4" }
# Async runtime for the data engine. The connection tasks live on a tokio
# runtime the `Engine` owns; widgets read shared state on the GUI thread. `net`
# is enabled so `enable_all()` (and the EPICS backends, later) work.
Expand Down
56 changes: 56 additions & 0 deletions rsdm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# rsdm

**RsDM — a PyDM-style EPICS display layer for [rsplot](https://crates.io/crates/rsplot).**

`rsdm` is a Rust port of [PyDM](https://github.com/slaclab/pydm)'s core engine
and widgets (a PyQt EPICS display manager), built on top of `rsplot`'s
egui/wgpu plotting and `epics-rs` (Channel Access + pvAccess) as the data
backend. PyDM depends on pyqtgraph the way this crate depends on `rsplot`.

License: MIT OR Apache-2.0.

---

## Layout

The crate mirrors PyDM's package layout:

- **`data_plugins`** — the channel/connection engine: a `protocol://address`
registry of `DataPlugin`s (`loc`, `fake`, `ca`, `pva`, `calc`), each owning
per-PV connections that publish a `ChannelState` snapshot read by widgets
every frame. Qt's per-slot signals collapse into one `Arc`-shared,
repaint-on-update state cell because egui re-renders from current state each
frame.
- **`widgets`** — retained widget structs (`RsdmLabel`, `RsdmLineEdit`,
`RsdmByteIndicator`, the time/waveform/scatter plots, the camera image view,
…) that read their channel's state and draw with alarm-severity styling,
connection gating, and precision/unit formatting.

## Backends

Backends are feature-gated. `loc://` and `fake://` are always compiled, so
`--no-default-features` gives the headless, dependency-light core exercised
with no live IOC.

| Feature | Default | Protocol | Pulls |
| :-- | :--: | :-- | :-- |
| `ca` | ✓ | `ca://` (Channel Access) | `epics-ca-rs`, `epics-base-rs` |
| `pva` | ✓ | `pva://` (pvAccess) | `epics-pva-rs` (+ compressed-NTNDArray codecs) |
| `calc` | ✓ | `calc://` (derived expressions) | the pure-Rust expression evaluator |

## Relationship to PyDM

`rsdm` ports PyDM's engine and widgets to Rust, following the upstream
behaviour to fine detail (alarm styling, connection gating, the `calc://`
trigger rules, the `ca://`/`pva://` metadata model). PyDM itself is the
reference; throughout the code and docs, bare `pydm` refers to the upstream
Python project, not to this crate.

## License

Licensed under either of

- Apache License, Version 2.0
- MIT license

at your option.
Loading