Software
Software
IOWeaver, the protocol analyzer and grapher; RockFace, the firmware debugger; mx3 for parts and assembly.
Three tools for the bench: one plots what a device says, one debugs the firmware that says it, one keeps the parts and the boards in order. draft
IOWeaver
A protocol analyzer and grapher for the desktop: it records, decodes, shows on a timeline and sends the traffic of a device. It is the GUI for Pinsmith and Portwright and ships with them.
- Record
- I2C, CAN, UART, GPIO, WireWeaver
- Decode
- the same protocols
- Show
- on a timeline, and plot
- Send
- back to the device
RockFace

A tracer and debugger for embedded firmware, for systems that are running. Commercial release: TBD.
- Logs
- from one board or a fleet
- Graphs
- stack and CPU use
- Profiling
- zero-cost
- Timeline
- sleep spans and events
mx3
The electronics side of an in-house lab system: from a BOM to parts on the shelf to an assembled board.



- BOM import from CSV or XLSX, with each line mapped to a part automatically.
- A BOM editor: part choices, variants, stock and box per line, cost with a price chart, a purchase list.
- A parts database with typed parameters and parametric search.
- Digi-Key pricing and stock for every part, with their history, kept fresh by a background crawler.
- A warehouse: boxes in boxes, stock, photos and a barcode scanner.
- Guided manual PCB assembly: it plans the placement and records every part that moves.
mx3 runs in VHRD’s own lab today. It may be opened up or offered as a product later.
From the terminal
Real runs of the command-line tools — cnt, WireWeaver’s ww, embedded_bedrock’s bedrock-lint and ExactUnits — recorded once and kept as text, colours and all. Under each one: the version, what it ran on and the day it was recorded.
Counters · 11 of 11 non-zero ╭ 📍 RAM counters at 0x24000178, 68 of 128 B used ───────────────────────────────────────────────────────────╮ │ Severity Name Value Type Location │ │ │ │▶ ● INFO adc/charge 25686 mAs u64 b135_demo @ src/main.rs:153 │ │ ◆ DEBUG adc/samples 212600 u64 b135_demo @ src/main.rs:150 │ │ ✖ ERROR can/bus_off 1 u32 b135_demo @ src/main.rs:127 │ │ ● INFO can/frames 9592 u64 b135_demo @ src/main.rs:139 │ │ ◇ TRACE ctrl/busy 4672452 µs u64 b135_demo @ src/main.rs:186 │ │ ▲ WARN ctrl/overruns 9 u32 b135_demo @ src/main.rs:187 │ │ ● INFO ctrl/ticks 21269 u64 b135_demo @ src/main.rs:179 │ │ ● INFO usb/RxPackets 25108 u64 b135_demo UsbEvent @ src/main.rs:40 │ │ ◆ DEBUG usb/RxBytes 12.7MB u64 b135_demo UsbEvent @ src/main.rs:40 │ │ ▲ WARN usb/CrcError 3 u32 b135_demo UsbEvent @ src/main.rs:40 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ 📍 BKP counters at 0x58004050, 4 of 16 B used ─────────────────────────────────────────────────────────────╮ │ Severity Name Value Type Location │ │ │ │ ● INFO boots 2 u32 b135_demo @ src/main.rs:50 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ 📜 defmt logs ─────────────────────────────────────────────────────────────────────────────────────────────╮ │0.000016 INFO b135_demo up: USB, CAN at 500 kbit/s, ADC at 10 kS/s, control loop at 1 kHz @ src/main.rs:51 │ │4.000144 INFO USB: host opened the bulk endpoint, firmware image transfer started @ src/main.rs:88 │ │12.000217 INFO ADC: +5V0_SYS 4.98 V, load 146 mA @ src/main.rs:158 │ │17.000178 ERROR CAN: bus-off after 248 TX errors, recovering @ src/main.rs:128 │ │19.000175 INFO CAN: back on the bus after 128 x 11 recessive bits @ src/main.rs:131 │ │ │ │ │ │ │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ q quit ↑↓/jk select g/G first/last Tab switch table r reset RAM R reset BKP c clear logs
$ ww api tree -d examples/all_gpio_api trait AllGpioApi all_gpio_api@0.1.0 └─ 0 #[claim(exclusive)] impl port[]: ww_gpio::Bank ├─ 0 impl pin[]: ww_gpio::Pin │ ├─ 0 fn set_output_level(level: Level) │ ├─ 1 fn toggle() │ ├─ 2 fn output_level() -> Level │ ├─ 3 fn input_level() -> Level │ ├─ 7 #[errors(Common(Unsupported))] #[counted] stream event(enabled: IoPinEnabledEvents): IoPinEvent -> Result<(), GpioError> │ ├─ 8 #[errors(Common(Unsupported, InUse, NoPower, Refused), DifferentModes)] fn set_mode(mode: Mode, initial: Option<Level>) -> Result<(), GpioError> │ ├─ 9 fn mode() -> Mode │ ├─ 10 #[errors(Common(Unsupported))] rw property pull: Pull, write error: GpioError │ ├─ 11 #[errors(Common(Unsupported))] rw property speed: Speed, write error: GpioError │ └─ 12 fn capabilities() -> PinCapabilities ├─ 8 fn capabilities() -> BankCapabilities ├─ 9 #[errors(Common(Unsupported, Refused))] fn configure(config: BankConfig) -> Result<BankConfig, GpioError> └─ 10 fn name() -> String
$ ww api tree -d examples/all_gpio_api trait AllGpioApi all_gpio_api@0.1.0 └─ 0 #[claim(exclusive)] impl port[]: ww_gpi o::Bank ├─ 0 impl pin[]: ww_gpio::Pin │ ├─ 0 fn set_output_level(level: Level) │ ├─ 1 fn toggle() │ ├─ 2 fn output_level() -> Level │ ├─ 3 fn input_level() -> Level │ ├─ 7 #[errors(Common(Unsupported))] #[ counted] stream event(enabled: IoPinEnabledE vents): IoPinEvent -> Result<(), GpioError> │ ├─ 8 #[errors(Common(Unsupported, InUs e, NoPower, Refused), DifferentModes)] fn se t_mode(mode: Mode, initial: Option<Level>) - > Result<(), GpioError> │ ├─ 9 fn mode() -> Mode │ ├─ 10 #[errors(Common(Unsupported))] r w property pull: Pull, write error: GpioErro r │ ├─ 11 #[errors(Common(Unsupported))] r w property speed: Speed, write error: GpioEr ror │ └─ 12 fn capabilities() -> PinCapabili ties ├─ 8 fn capabilities() -> BankCapabilitie s ├─ 9 #[errors(Common(Unsupported, Refused ))] fn configure(config: BankConfig) -> Resu lt<BankConfig, GpioError> └─ 10 fn name() -> String
$ ww api check compatible blinky_api 0.1.0 (compatible/api_snapshots/blinky_api_0_1_0.ron) -> 0.2.0 (source): breaking changes needs: wire w1.0 -> w1.1 or later (a new wire revision), crate 0.1.0 -> 0.2.0 or later (breaking position (minor before 1.0, major after)) breaking (Rust only, the wire is compatible): BlinkyApi::led_on: takes 0 argument(s) on the old version, 1 on the new version: the same bytes on the wire, but other parameters for handlers and client calls rule: arguments added at the end with a default, or promoted to a #[flatten] struct, keep the wire, but change the Rust signatures of handlers and client calls (docs/evolution/rules.md#arguments) Error: blinky_api declared wire version w1.0, the new version declares none. Declare the wire version in `[package.metadata.wire_weaver] wire` of compatible/Cargo.toml, w1.1 or later (docs/evolution/versions.md#the-wire-version). $ ww api check breaking blinky_api 0.1.0 (breaking/api_snapshots/blinky_api_0_1_0.ron) -> 0.1.1 (source): breaking changes needs: wire w1.0 -> w2.0 or later (a new wire line), crate 0.1.0 -> 0.2.0 or later (breaking position (minor before 1.0, major after)) breaking: BlinkyApi::led_on: argument `brightness` is not sent by the old version and has no #[default] rule: a resource works between the old and the new version, both ways (old client with a new device, new client with an old device) (docs/evolution/rules.md#api) Error: blinky_api 0.1.0 -> 0.1.1 has breaking changes, which requires a bump of the breaking position (minor before 1.0, major after): 0.2.0 or later. Bump `version` in breaking/Cargo.toml to 0.2.0 or later (docs/evolution/versions.md#your-apis-version); once that version is released, record it with `ww api save breaking` and commit api_snapshots/. blinky_api declared wire version w1.0, the new version declares none. Declare the wire version in `[package.metadata.wire_weaver] wire` of breaking/Cargo.toml, w2.0 or later (docs/evolution/versions.md#the-wire-version).
$ ww api check compatible blinky_api 0.1.0 (compatible/api_snapshots/b linky_api_0_1_0.ron) -> 0.2.0 (source): brea king changes needs: wire w1.0 -> w1.1 or later (a new w ire revision), crate 0.1.0 -> 0.2.0 or later (breaking position (minor before 1.0, major after)) breaking (Rust only, the wire is compatibl e): BlinkyApi::led_on: takes 0 argument(s) o n the old version, 1 on the new version: the same bytes on the wire, but other parameter s for handlers and client calls rule: arguments added at the end with a default, or promoted to a #[flatten] struc t, keep the wire, but change the Rust signat ures of handlers and client calls (docs/evol ution/rules.md#arguments) Error: blinky_api declared wire version w1.0 , the new version declares none. Declare the wire version in `[package.metada ta.wire_weaver] wire` of compatible/Cargo.to ml, w1.1 or later (docs/evolution/versions.m d#the-wire-version). $ ww api check breaking blinky_api 0.1.0 (breaking/api_snapshots/bli nky_api_0_1_0.ron) -> 0.1.1 (source): breaki ng changes needs: wire w1.0 -> w2.0 or later (a new w ire line), crate 0.1.0 -> 0.2.0 or later (br eaking position (minor before 1.0, major aft er)) breaking: BlinkyApi::led_on: argument `bri ghtness` is not sent by the old version and has no #[default] rule: a resource works between the old and the new version, both ways (old client with a new device, new client with an old de vice) (docs/evolution/rules.md#api) Error: blinky_api 0.1.0 -> 0.1.1 has breakin g changes, which requires a bump of the brea king position (minor before 1.0, major after ): 0.2.0 or later. Bump `version` in breaking/Cargo.toml to 0.2 .0 or later (docs/evolution/versions.md#your -apis-version); once that version is release d, record it with `ww api save breaking` and commit api_snapshots/. blinky_api declared wire version w1.0, the n ew version declares none. Declare the wire version in `[package.metada ta.wire_weaver] wire` of breaking/Cargo.toml , w2.0 or later (docs/evolution/versions.md# the-wire-version).
$ bedrock-lint check error[STK-1]: no linker set for thumbv7em-none-eabihf: it links with rust-lld, not flip-link; a stack overflow runs into .data and .bss unnoticed. --> .cargo/config.toml:4 | [target.thumbv7em-none-eabihf] = fix: add `linker = "flip-link"` under `[target.<triple>]` in .cargo/config.toml (cargo install flip-link); a `cargo:rustc-linker` line in build.rs does nothing (STK-2) = STK-1: flip-link not the linker: linker = "flip-link" under [target.<triple>] in .cargo/config.toml (bedrock-lint explain STK-1) error[FLT-1]: no HardFault handler: cortex-m-rt's default spins in `loop {}`, so a fault hangs the board until someone power-cycles it --> src/main.rs:20:4 | fn main() -> ! { = fix: save a crash record (bedrock_crash::capture_fault) and reset (bedrock_crash::reset(), SCB::sys_reset()) instead of spinning = FLT-1: HardFault handler that spins (loop {}) in a shipped build: record (crash capture) and reset (bedrock-lint explain FLT-1) error[FLT-7]: no watchdog: a hang in a task or a stuck bus stays hung until someone power-cycles the board --> src/main.rs:20:4 | fn main() -> ! { = fix: start the independent watchdog at boot and feed it from a supervisor that checks the tasks made progress = FLT-7: No watchdog, or a watchdog fed from an interrupt or from a loop not bounded by a timeout; window not calibrated to the real period (bedrock-lint explain FLT-7) warning[IRQ-8]: no #[exception] fn DefaultHandler in the source seen: an interrupt that fires on an unbound vector goes unnoticed instead of being counted (estimate) --> Cargo.toml:13 | cortex-m-rt = "0.7" = fix: add #[exception] fn DefaultHandler(irqn: i16) that records irqn raw (a static, the crash record or cnt!) = IRQ-8: Unused interrupt vectors not caught: DefaultHandler must record the IRQ number (raw: a static, the crash record or a counter; not logging it, FLT-2) (bedrock-lint explain IRQ-8) warning[FLT-4]: no UsageFault, MemoryManagement, BusFault handler: these faults escalate to HardFault, and the crash record cannot tell them apart --> src/main.rs:20:4 | fn main() -> ! { = fix: add `#[exception]` handlers for UsageFault, MemoryManagement and BusFault that record and reset, and enable them in SHCSR (`scb.enable(Exception::UsageFault)`, ...) = FLT-4: No UsageFault, MemManage and BusFault handlers (or not enabled in SHCSR) where the core has them (bedrock-lint explain FLT-4) warning[FLT-5]: the reset cause is never read: a brown-out, a watchdog or a lockup reset looks like a normal start --> src/main.rs:20:4 | fn main() -> ! { = fix: read the reset flags at boot (RCC_CSR / RCC_RSR, RP CHIP_RESET and WATCHDOG.REASON), clear them, and report the cause (the template's last_reset.rs, `bedrock_crash::boot`) = FLT-5: Reset cause not read and reported at boot (power-on, brown-out, watchdog, software, pin, lockup) (bedrock-lint explain FLT-5) warning[FLT-8]: no boot-loop rescue: a crash at start-up repeats on every boot, and only a probe gets the board back --> src/main.rs:20:4 | fn main() -> ! { = fix: count boots without a healthy mark in a backup register and fall back to the ROM bootloader after a few (bedrock_rom_boot::early, the template's boot.rs) = FLT-8: No boot-loop rescue: count boots without a healthy mark in a backup register, fall back to the ROM bootloader after a few (bedrock-lint explain FLT-8) warning[FLS-4]: nothing checks the image in flash: a flipped bit runs until the code it is in executes --> src/main.rs:20:4 | fn main() -> ! { = fix: compute a CRC of the image at boot and periodically in a low-priority task, compare it with the one the build stored, and count a mismatch = FLS-4: No periodic CRC of the image in flash, no ECC on flash and RAM where the part has it (bedrock-lint explain FLS-4) warning[CNT-1]: `Err(winner)` is handled in `cnt::buffers::Index::allocate` without a counter (candidate) --> ../../cnt/src/buffers.rs:116:13 error branch | Err(winner) => winner, = fix: count it: `cnt!(what_happened)` in the branch (cnt crate), so it shows in `cnt read` = CNT-1: Error branch (an Err handled, a timeout, a retry, a dropped frame, an overrun) without a cnt! counter: unexpected events must be counted (bedrock-lint explain CNT-1) warning[CFG-7]: no bedrock_build dependency: the build carries no git SHA or dirty flag, so a dirty build flashed by mistake can't be told apart from a clean one by reading the device (estimate) --> Cargo.toml = fix: add bedrock_build as a build-dependency and call serialize_build_info() from build.rs (book/build_info.md) = CFG-7: Dirty build flashed without a mark: build info carries the git SHA and a dirty flag, read back from the device (bedrock-lint explain CFG-7) suggestion[SIZ-4]: release profile is missing lto, panic = "abort": opt-level alone is the smallest lever (z vs 3 is 10-25 % speed, measure before choosing) (estimate) --> Cargo.toml:16 | [profile.release] = fix: add lto, panic = "abort" to [profile.release] = SIZ-4: Release profile without codegen-units = 1, lto, panic = "abort", and an opt-level chosen by measurement (z vs 3 is the largest lever: Donguru 501.7 → 321.8 KiB, 10-25 % slower USB) (bedrock-lint explain SIZ-4) Not run: DMA-1 no ELF given: pass --elf target/<triple>/release/<name> DMA-2 bedrock_fw.json names no chip (answers.chip) DMA-6 bedrock_fw.json names no chip (answers.chip) STK-3 no ELF given: pass --elf target/<triple>/release/<name> STK-5 no ELF given: pass --elf target/<triple>/release/<name> STK-6 no ELF given: pass --elf target/<triple>/release/<name> MEM-3 no ELF given: pass --elf target/<triple>/release/<name> MEM-6 no ELF given: pass --elf target/<triple>/release/<name> MEM-10 no ELF given: pass --elf target/<triple>/release/<name> SIZ-1 no ELF given: pass --elf target/<triple>/release/<name> SIZ-6 no ELF given: pass --elf target/<triple>/release/<name> ERR-3 no ELF given: pass --elf target/<triple>/release/<name> CFG-2 bedrock_fw.json names no chip (answers.chip) CFG-5 bedrock_fw.json names no chip (answers.chip) PERF-2 no ELF given: pass --elf target/<triple>/release/<name> PERF-3 no ELF given: pass --elf target/<triple>/release/<name> counters_fw: 3 errors, 7 warnings, 1 suggestion · 81 checks ran, 16 not run · 97 of 116 automatic catalogue checks implemented
$ bedrock-lint check error[STK-1]: no linker set for thumbv7em-no ne-eabihf: it links with rust-lld, not flip- link; a stack overflow runs into .data and . bss unnoticed. --> .cargo/config.toml:4 | [target.thumbv7em-none-eabihf] = fix: add `linker = "flip-link"` under ` [target.<triple>]` in .cargo/config.toml (ca rgo install flip-link); a `cargo:rustc-linke r` line in build.rs does nothing (STK-2) = STK-1: flip-link not the linker: linker = "flip-link" under [target.<triple>] in .c argo/config.toml (bedrock-lint explain STK-1 ) error[FLT-1]: no HardFault handler: cortex-m -rt's default spins in `loop {}`, so a fault hangs the board until someone power-cycles it --> src/main.rs:20:4 | fn main() -> ! { = fix: save a crash record (bedrock_crash ::capture_fault) and reset (bedrock_crash::r eset(), SCB::sys_reset()) instead of spinnin g = FLT-1: HardFault handler that spins (lo op {}) in a shipped build: record (crash cap ture) and reset (bedrock-lint explain FLT-1) error[FLT-7]: no watchdog: a hang in a task or a stuck bus stays hung until someone powe r-cycles the board --> src/main.rs:20:4 | fn main() -> ! { = fix: start the independent watchdog at boot and feed it from a supervisor that chec ks the tasks made progress = FLT-7: No watchdog, or a watchdog fed f rom an interrupt or from a loop not bounded by a timeout; window not calibrated to the r eal period (bedrock-lint explain FLT-7) warning[IRQ-8]: no #[exception] fn DefaultHa ndler in the source seen: an interrupt that fires on an unbound vector goes unnoticed in stead of being counted (estimate) --> Cargo.toml:13 | cortex-m-rt = "0.7" = fix: add #[exception] fn DefaultHandler (irqn: i16) that records irqn raw (a static, the crash record or cnt!) = IRQ-8: Unused interrupt vectors not cau ght: DefaultHandler must record the IRQ numb er (raw: a static, the crash record or a cou nter; not logging it, FLT-2) (bedrock-lint e xplain IRQ-8) warning[FLT-4]: no UsageFault, MemoryManagem ent, BusFault handler: these faults escalate to HardFault, and the crash record cannot t ell them apart --> src/main.rs:20:4 | fn main() -> ! { = fix: add `#[exception]` handlers for Us ageFault, MemoryManagement and BusFault that record and reset, and enable them in SHCSR (`scb.enable(Exception::UsageFault)`, ...) = FLT-4: No UsageFault, MemManage and Bus Fault handlers (or not enabled in SHCSR) whe re the core has them (bedrock-lint explain F LT-4) warning[FLT-5]: the reset cause is never rea d: a brown-out, a watchdog or a lockup reset looks like a normal start --> src/main.rs:20:4 | fn main() -> ! { = fix: read the reset flags at boot (RCC_ CSR / RCC_RSR, RP CHIP_RESET and WATCHDOG.RE ASON), clear them, and report the cause (the template's last_reset.rs, `bedrock_crash::b oot`) = FLT-5: Reset cause not read and reporte d at boot (power-on, brown-out, watchdog, so ftware, pin, lockup) (bedrock-lint explain F LT-5) warning[FLT-8]: no boot-loop rescue: a crash at start-up repeats on every boot, and only a probe gets the board back --> src/main.rs:20:4 | fn main() -> ! { = fix: count boots without a healthy mark in a backup register and fall back to the R OM bootloader after a few (bedrock_rom_boot: :early, the template's boot.rs) = FLT-8: No boot-loop rescue: count boots without a healthy mark in a backup register , fall back to the ROM bootloader after a fe w (bedrock-lint explain FLT-8) warning[FLS-4]: nothing checks the image in flash: a flipped bit runs until the code it is in executes --> src/main.rs:20:4 | fn main() -> ! { = fix: compute a CRC of the image at boot and periodically in a low-priority task, co mpare it with the one the build stored, and count a mismatch = FLS-4: No periodic CRC of the image in flash, no ECC on flash and RAM where the par t has it (bedrock-lint explain FLS-4) warning[CNT-1]: `Err(winner)` is handled in `cnt::buffers::Index::allocate` without a co unter (candidate) --> ../../cnt/src/buffers.rs:116:13 error branch | Err(winner) => winner, = fix: count it: `cnt!(what_happened)` in the branch (cnt crate), so it shows in `cnt read` = CNT-1: Error branch (an Err handled, a timeout, a retry, a dropped frame, an overru n) without a cnt! counter: unexpected events must be counted (bedrock-lint explain CNT-1 ) warning[CFG-7]: no bedrock_build dependency: the build carries no git SHA or dirty flag, so a dirty build flashed by mistake can't b e told apart from a clean one by reading the device (estimate) --> Cargo.toml = fix: add bedrock_build as a build-depen dency and call serialize_build_info() from b uild.rs (book/build_info.md) = CFG-7: Dirty build flashed without a ma rk: build info carries the git SHA and a dir ty flag, read back from the device (bedrock- lint explain CFG-7) suggestion[SIZ-4]: release profile is missin g lto, panic = "abort": opt-level alone is t he smallest lever (z vs 3 is 10-25 % speed, measure before choosing) (estimate) --> Cargo.toml:16 | [profile.release] = fix: add lto, panic = "abort" to [profi le.release] = SIZ-4: Release profile without codegen- units = 1, lto, panic = "abort", and an opt- level chosen by measurement (z vs 3 is the l argest lever: Donguru 501.7 → 321.8 KiB, 10- 25 % slower USB) (bedrock-lint explain SIZ-4 ) Not run: DMA-1 no ELF given: pass --elf target/<tri ple>/release/<name> DMA-2 bedrock_fw.json names no chip (answe rs.chip) DMA-6 bedrock_fw.json names no chip (answe rs.chip) STK-3 no ELF given: pass --elf target/<tri ple>/release/<name> STK-5 no ELF given: pass --elf target/<tri ple>/release/<name> STK-6 no ELF given: pass --elf target/<tri ple>/release/<name> MEM-3 no ELF given: pass --elf target/<tri ple>/release/<name> MEM-6 no ELF given: pass --elf target/<tri ple>/release/<name> MEM-10 no ELF given: pass --elf target/<tr iple>/release/<name> SIZ-1 no ELF given: pass --elf target/<tri ple>/release/<name> SIZ-6 no ELF given: pass --elf target/<tri ple>/release/<name> ERR-3 no ELF given: pass --elf target/<tri ple>/release/<name> CFG-2 bedrock_fw.json names no chip (answe rs.chip) CFG-5 bedrock_fw.json names no chip (answe rs.chip) PERF-2 no ELF given: pass --elf target/<tr iple>/release/<name> PERF-3 no ELF given: pass --elf target/<tr iple>/release/<name> counters_fw: 3 errors, 7 warnings, 1 suggest ion · 81 checks ran, 16 not run · 97 of 116 automatic catalogue checks implemented
use exact_units::{Fixed, prefix::One, units::{Joule, Torque}};
fn main() {
// angle is a dimension: a torque is N·m per radian, not an energy
let _ = Fixed::<Torque, One, i32>::new(5).convert::<Joule, One, i32>();
}$ cargo build -q error[E0080]: evaluation panicked: a Fixed converts only between units of the same dimension: Torque (N·m) is kg·m²·s⁻²·rad⁻¹, not Joule (J) which is kg·m²·s⁻²; they differ by rad⁻¹ — cross it with a named step: Torque × Radian is Joule --> ~/.cargo/git/checkouts/exact_units-0e04409aaab251a0/90d25ff/src/fixed.rs:445:25 | 445 | let c = const { Conversion::between::<U, P, U2, P2, T, T2>(false) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `exact_units::Fixed::<exact_units::units::Torque, exact_units::prefix::One, i32>::convert::<exact_units::units::Joule, exact_units::prefix::One, i32>::{constant#0}` failed inside this call | note: inside `exact_units::fixed::Conversion::between::<Torque, One, Joule, One, i32, i32>` --> ~/.cargo/git/checkouts/exact_units-0e04409aaab251a0/90d25ff/src/fixed.rs:907:13 | 907 | crate::conv_error::dim_mismatch::<U, U2>("a Fixed"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: inside `exact_units::conv_error::dim_mismatch::<Torque, Joule>` --> /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/panic.rs:57:9 | 57 | $crate::panicking::panic_display(&$arg); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here | ::: ~/.cargo/git/checkouts/exact_units-0e04409aaab251a0/90d25ff/src/conv_error.rs:388:5 | 388 | panic!("{}", msg.as_str()) | -------------------------- in this macro invocation note: erroneous constant encountered --> ~/.cargo/git/checkouts/exact_units-0e04409aaab251a0/90d25ff/src/fixed.rs:445:17 | 445 | let c = const { Conversion::between::<U, P, U2, P2, T, T2>(false) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: the above error was encountered while instantiating `fn Fixed::<Torque, One, i32>::convert::<Joule, One, i32>` --> src/main.rs:5:13 | 5 | let _ = Fixed::<Torque, One, i32>::new(5).convert::<Joule, One, i32>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For more information about this error, try `rustc --explain E0080`. error: could not compile `units_demo` (bin "units_demo") due to 1 previous error
$ cargo build -q error[E0080]: evaluation panicked: a Fixed c onverts only between units of the same dimen sion: Torque (N·m) is kg·m²·s⁻²·rad⁻¹, not J oule (J) which is kg·m²·s⁻²; they differ by rad⁻¹ — cross it with a named step: Torque × Radian is Joule --> ~/.cargo/git/checkouts/exact_units-0e 04409aaab251a0/90d25ff/src/fixed.rs:445:25 | 445 | ... { Conversion::between::<U, P, U2, P2, T, T2>(false) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ evaluation of `exact_units ::Fixed::<exact_units::units::Torque, exact_ units::prefix::One, i32>::convert::<exact_un its::units::Joule, exact_units::prefix::One, i32>::{constant#0}` failed inside this call | note: inside `exact_units::fixed::Conversion ::between::<Torque, One, Joule, One, i32, i3 2>` --> ~/.cargo/git/checkouts/exact_units-0e 04409aaab251a0/90d25ff/src/fixed.rs:907:13 | 907 | ... crate::conv_error::dim_mismatch: :<U, U2>("a Fixed"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ note: inside `exact_units::conv_error::dim_m ismatch::<Torque, Joule>` --> /rustc/58cf8f9c35b355199727627d07ae34 a4e2846d67/library/core/src/panic.rs:57:9 | 57 | ... $crate::panicking::panic_display (&$arg); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ the failure occurred here | ::: ~/.cargo/git/checkouts/exact_units-0e 04409aaab251a0/90d25ff/src/conv_error.rs:388 :5 | 388 | panic!("{}", msg.as_str()) | -------------------------- in this macro invocation note: erroneous constant encountered --> ~/.cargo/git/checkouts/exact_units-0e 04409aaab251a0/90d25ff/src/fixed.rs:445:17 | 445 | ... = const { Conversion::between::<U, P, U2, P2, T, T2>(false) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: the above error was encountered while instantiating `fn Fixed::<Torque, One, i32>: :convert::<Joule, One, i32>` --> src/main.rs:5:13 | 5 | ... = Fixed::<Torque, One, i32>::new(5). convert::<Joule, One, i32>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For more information about this error, try ` rustc --explain E0080`. error: could not compile `units_demo` (bin " units_demo") due to 1 previous error