Elektrine lite

← Feed

@katzenmann@c3d2.social

Post #1674812

2026-04-17 07:59 UTC

I thought about writing my own mobile UI for Linux for fun but thinking about it, I did not find a suitable language to write it in. These are the options I thought about: - C: Slow development, is probably going to crash sometimes and have memory corruption bugs - C++: Fast development, is going to crash a lot more than C and may also have memory corruption bugs - Rust: Fast development, crashes less likely but no dynamic linking means that every component is going to be megabytes in size and have a lot of unvetted dependencies which I don't really want in a desktop environment There's Zig which might improve a bit upon C but development is still going to be slow. Does anybody have any other ideas? #rust #cpp #c #wayland #postmarketos #mobilelinux

Replies (6)

  • @katzenmann@c3d2.social 2026-04-17 08:25

    I really hope crABI becomes a thing soon. https://github.com/rust-lang/rust/issues/111423

    Open ##2016487

  • @_@aviac.dev 2026-04-17 08:26

    @katzenmann Does rusts dynamic linking not work for this use case? https://doc.rust-lang.org/stable/reference/linkage.html?highlight=cdylib

    Open ##2016488

  • @lw64@chaos.social 2026-04-17 12:20

    @katzenmann qml with js (what quick shell uses), or mutter and gjs (gnome shell stack)

    Open ##2016497

  • @michalfita@mastodon.social 2026-04-17 13:08

    @katzenmann Assumption idiomatic C++ would crash more than C is (from my experience) wrong (and my delivered fully C++ embedded system to 50k customers). Then I don't thing on a large project Zig would less likely crash than C as it doesn't have inherent safety enforcement, it's just nicer language to use with some ideas similar to Go.

    Open ##2016502

  • @sirwumpus@tilde.zone 2026-04-17 13:31

    @katzenmann IMO it possible to develop quick in #C, but its always my favourite. For system languages close to the silicon, you picked most of them. #Forth also works close the silicon if you're game, but different perspective. Don't know enough about #Go yet to judge it.

    Open ##2016504

  • @laund@wetdry.world 2026-04-17 19:39

    @katzenmann Rust has dynamic linking. It doesn't have a stable ABI. It has a ABI, but its not stable, meaning the components have to be compiled by the same compiler version on the same machine to reasonably expect them to work. It also supports the C ABI in that you can write code for it, and theres multiple third-party ones like stabby. Its not a great state to be in, but its slightly better than "no dynamic linking" as you claimed also, multiple megabytes binary sizes are not inherently gonna happen. embedded development would be impossible if that was the case

    Open ##2016505