What watches can run Rust?

Maybe a little weird question but do you maybe know a smart watch that can run rust? I got running Egui on my Galaxy Watch 4 with WearOS and I'm thinking if any other watch (other than Galaxy and Pixel) can do that?

12 points · 4 comments · view on lemmy.world

4 Comments

pkill@programming.dev · 14 pts · 2y (2 replies)

Anything that can run C++ should be able to run Rust if you use the LLVM backend, perhaps except when a watch uses musl libc and you rely on some glibc-only call in your program. afaik the only physical devices shipping with musl are car infotainment systems based on l4 kernels and networking hardware (OpenWRT).

BB_C@programming.dev · 7 pts · 2y (1 reply)

Your answer wanders a bit unnecessarily IMHO.

  • no-std Rust has no run-time dependencies of its own.
  • std Rust runtime-requirements are basically libc, a heap allocator, and a threading library. Many implementations on many OSes are already supported, including musl on Linux. And what's not supported can theoretically be so in the future.
  • Code generation at build-time is dependent on LLVM, with cranelift and (soon) GCC available as not fully mature alternatives.
  • 3rd party code/crates may impose additional requirements.
pkill@programming.dev · 1 pts · 2y

I did not really mean that out of the box there would be incompatibilities, more likely within unsafe blocks and external crates

Mazesecle@lemm.ee · 5 pts · 2y
pkill@programming.dev · 3 pts · 2y
[ removed ]
friend_of_satan@lemmy.world · 3 pts · 2y
[ removed ]