From e29b195262c2f3f9919646c2c57f53f3a48b891c Mon Sep 17 00:00:00 2001 From: Sang Woo Kim Date: Thu, 16 Jul 2026 10:09:57 +0900 Subject: [PATCH 1/2] docs(rsdm,adl2rsdm): add the README crates.io renders per crate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `rsplot` sets `readme = "README.md"` and its crates.io page renders it; `rsdm` and `adl2rsdm` had neither a `readme` field nor a README file, so their per-crate pages showed nothing (the rendered-readme endpoint 403s for 0.5.3). Each gets a README sourced from its own crate-level docs — rsdm's PyDM-port layout / feature-gated backends, adl2rsdm's adl2pydm-mirrored pipeline — plus the `readme = "README.md"` field, matching rsplot. Verified both land in the packaged `.crate`. crates.io bakes the README per published version, so this surfaces only on the next release, not retroactively on 0.5.3. --- adl2rsdm/Cargo.toml | 1 + adl2rsdm/README.md | 52 +++++++++++++++++++++++++++++++++++++++++ rsdm/Cargo.toml | 1 + rsdm/README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 adl2rsdm/README.md create mode 100644 rsdm/README.md diff --git a/adl2rsdm/Cargo.toml b/adl2rsdm/Cargo.toml index a5788b8..e703f8f 100644 --- a/adl2rsdm/Cargo.toml +++ b/adl2rsdm/Cargo.toml @@ -6,6 +6,7 @@ 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 diff --git a/adl2rsdm/README.md b/adl2rsdm/README.md new file mode 100644 index 0000000..6de62d9 --- /dev/null +++ b/adl2rsdm/README.md @@ -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. diff --git a/rsdm/Cargo.toml b/rsdm/Cargo.toml index 20f6211..22f5b10 100644 --- a/rsdm/Cargo.toml +++ b/rsdm/Cargo.toml @@ -6,6 +6,7 @@ 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 diff --git a/rsdm/README.md b/rsdm/README.md new file mode 100644 index 0000000..18b6a5f --- /dev/null +++ b/rsdm/README.md @@ -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. From 190ee5e8074beb73ebd7243b8ac20ca9623a527a Mon Sep 17 00:00:00 2001 From: Sang Woo Kim Date: Thu, 16 Jul 2026 10:13:59 +0900 Subject: [PATCH 2/2] chore(release): 0.5.4 Documentation-only patch release: rsdm and adl2rsdm gained the README that crates.io renders per crate (they shipped without one; rsplot's already rendered). crates.io bakes the README into each published version, so surfacing it required a new release rather than an edit to 0.5.3. No code or behaviour changes. All three crates bump in lockstep as always. --- CHANGELOG.md | 15 ++++++++++++++- Cargo.toml | 2 +- adl2rsdm/Cargo.toml | 2 +- rsdm/Cargo.toml | 4 ++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3483e03..3e9faab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 / @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 70659c4..c243642 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/adl2rsdm/Cargo.toml b/adl2rsdm/Cargo.toml index e703f8f..8e396fb 100644 --- a/adl2rsdm/Cargo.toml +++ b/adl2rsdm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "adl2rsdm" -version = "0.5.3" +version = "0.5.4" edition = "2024" rust-version = "1.92" license = "MIT OR Apache-2.0" diff --git a/rsdm/Cargo.toml b/rsdm/Cargo.toml index 22f5b10..070ede7 100644 --- a/rsdm/Cargo.toml +++ b/rsdm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rsdm" -version = "0.5.3" +version = "0.5.4" edition = "2024" rust-version = "1.92" license = "MIT OR Apache-2.0" @@ -54,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.