14
submitted 3 months ago by chevy9294@monero.town to c/rust@programming.dev

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?

all 8 comments
sorted by: hot top controversial new old
[-] pkill@programming.dev 15 points 3 months ago* (last edited 3 months ago)

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 points 3 months ago

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 points 3 months ago

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

[-] thingsiplay@beehaw.org 10 points 3 months ago

Do you mean compiler running on the Watch? Because the compiled code is no longer Rust and therefore there is no reason why it should not run on the Watch. Or do you mean specifically applications with the Rust library Egui?

[-] chevy9294@monero.town 5 points 3 months ago

I mean applications with any Rust GUI library that can interact with watch's OS.

[-] Mazesecle@lemm.ee 5 points 3 months ago
[-] friend_of_satan@lemmy.world 2 points 3 months ago

There are two people on GH working on watchy rust firmwares

this post was submitted on 11 Aug 2024
14 points (88.9% liked)

Rust

5999 readers
20 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS