Build and test
Run product commands from the EmbedScope source root. The documentation site is maintained in the separate EmbedScope_website repository.
Prepare the tools
On macOS, Command Line Tools provide the system C tools. Linux desktop builds require X11/Wayland and OpenGL development dependencies. Windows requires a C compiler/linker matching the Rust host target. The CLI E2E script uses POSIX pipes.
Build the host tools
The executables are target/debug/escope and target/debug/escope-desktop, with .exe on Windows. Add --release for optimized binaries under target/release/.
Start the reference device in one terminal:
Then launch the Inspector in another:
Default workspace members exclude the desktop package. Explicit desktop commands or --workspace include it.
simulate supplies synthetic data independently of the LVGL provider.
Run workspace and native tests
Workspace tests cover protocol, Agent, host, C ABI, UI bridge, and desktop behavior, including subtree order, ancestor-preserving search, and overlapping-object selection. Native LVGL tests verify widget/layout classification, reads, deletion, and revision with a real memory display. They run serially because LVGL has global state.
An independent consumer uses registry rs_lvgl / rs_lvgl_ui 0.8.0 to build a real 320×240 memory display. It verifies widget kinds, native host hierarchy, padding-derived geometry, and stale revisions. The composition test covers typed constructors, component slots, conditional children, controlled-input reconciliation, and top-layer dialogs.
The api-0-8 feature includes composition and retains checks for container, progress_bar, message_box, animated_image, Style::plain, independent Flex alignment, and semantic part styles. The test platform provides an RGB memory display and native Pointer to check actual pixels, native kinds, geometry, and revision after an input-driven application update.
The 0.8 consumer also checks range sliders, textarea input options, ChartSpec/history, and a custom arc with Props. After property updates, it reads back native values and kinds, checks reused objects and native hierarchy, and verifies that advancing the revision invalidates old cursors. Separate configuration probes exercise providers with no layouts, Grid only, and Flex only:
Before publication, python3 scripts/release.py verify runs the same native UI consumer against extracted SDK archives. Post-publication registry verification uses crates.io dependencies only. Both paths require a single rs_lvgl_sys 0.8.0 provider. These tests do not exercise a physical panel.
Exercise the CLI end to end
The script starts a software reference device in another process and checks JSON, commands, input, PNGs, and diagnosis output. Each run writes a new target/validation/cli-e2e-* directory. Its pixels and metrics are synthetic.
Link and run the C ABI harness
The script builds a host staticlib wrapper, compiles and links the C11 harness with the system compiler, and runs it. Set CC to choose a C compiler. Outputs are under target/validation/c-api/, including harness.log.
This verifies the host ABI path. Firmware requires its actual Rust target, final staticlib wrapper, panic handler, runtime, and linker setup. See C/C++ integration.
Check bare-metal libraries
The target check covers default library features without a host runtime. It does not link an application or validate a board. Native LVGL integration also needs the application's actual provider, configuration, and firmware link.
Run the product gate
The gate runs formatting, workspace and native clippy, workspace/native tests, the 0.8 UI consumer, three LVGL configuration probes, RISC-V library compilation, CLI E2E, and the C harness. Install the components and target first.
Individual static checks are:
Extend desktop languages
The Inspector uses Fluent catalogs and currently supports English and Simplified Chinese. The globe menu changes the language; desktop application storage saves the preference. Device data and original errors remain literal.
To add a language, copy crates/escope-desktop/locales/en-US.ftl, translate values while preserving message IDs and named parameters, and register its ID, native name, embedded resource, and documentation prefix in LOCALES in src/i18n.rs. Views need no language-specific branches. Use the English documentation prefix when a translated site is unavailable.
Tests check catalog and parameter parity, Fluent syntax, formatting fallback, saved preferences, and bilingual layout and state at minimum and default window sizes. Also check native font coverage and control widths for a new language. The product repository's crates/escope-desktop/README.md contains the source map and translation rules.
Validate a platform integration
Use the platform build and actual hardware to verify identity, capabilities, logs/metrics, bad-frame recovery, disconnect/reconnect, current tree, capture source, accepted input, and cleanup of held input or an interrupted capture. Keep source revision, firmware identity, host commands, and output files together.
The Dango OS integration guide provides commands for a platform with separate console and diagnostic CDC functions. Use its identity, tree, display, and input workflow as a starting point for the corresponding capabilities on another device.
Build the documentation
In EmbedScope_website, use Node.js ^20.19.0 || >=22.12.0 as required by package.json:
check-docs checks frontmatter, navigation, links, and locale parity. check-build inspects production output. Use npm run dev for authoring and npm run preview for the production preview. Verify the configured deployment base when checking absolute routes and assets.