Remix.run Logo
jandrewrogers a day ago

The glaring omission from that long post is the term "opportunity cost".

Ensuring a code base indefinitely supports arbitrary architectures carries a substantial code architecture cost. Furthermore, it is difficult to guarantee testing going forward or that the toolchains available for those architectures will continue to evolve with your code base. I'm old enough to have lived this reality back when it was common. It sucked hard. I've also written a lot of code that was portable to some very weird silicon so I know what that entails. It goes far beyond endian-ness, that is just one aspect of silicon portability.

The expectation that people should volunteer their time for low ROI unpleasantness that has a high risk of being unmaintainable in the near future is unreasonable. There are many other facets of the code base where that time may be better invested. That's not "anti-portable", it is recognition of the potential cost to a large base of existing users when you take it on. The Pareto Principle applies here.

Today, I explicitly only support two architectures: 64-bit x86 and ARM (little-endian). It is wonderful that we have arrived at the point where this is a completely viable proposition. In most cases the cost of supporting marginal users on rare architectures in the year 2026 is not worth it. The computing world is far, far less fragmented than it used to be.

lmm a day ago | parent | next [-]

> Ensuring a code base indefinitely supports arbitrary architectures carries a substantial code architecture cost.

I'd say just the opposite; it nudges you towards well-factored approaches and ultimately carries a code architecture benefit, just like having automated tests or using structured programming.

tacitusarc a day ago | parent [-]

For a relatively small set of dimensions this is true. But the more abstractions the code needs to accommodate, the trickier and more prone to leaky abstractions it becomes. Removing one axis of complexity can be incredibly helpful.

PaulDavisThe1st a day ago | parent [-]

For the Ardour codebase (922k LoC at present, ignoring the vendored GTK/Gtkmm trees), we've found that every new architecture and new OS/platform that we've ported to has thrown up challenges and notably improved the code. That has included FPU/SIMD specializations too.

pjc50 a day ago | parent | prev | next [-]

> Today, I explicitly only support two architectures: 64-bit x86 and ARM (little-endian). It is wonderful that we have arrived at the point where this is a completely viable proposition. In most cases the cost of supporting marginal users on rare architectures in the year 2026 is not worth it.

This - and efforts to reintroduce BE should be resisted in the same way as people who want to drive on the other side of the road for pure whimsy.

I note that we've mostly converged on one set of floating point semantics as well, although across a range of bit widths.

nextaccountic a day ago | parent | prev | next [-]

Why not wasm?

jltsiren a day ago | parent [-]

Wasm is in an awkward place, because Memory64 is widely but not universally supported. Which means that if you want to support Wasm, you probably have to support 32-bit environments in general. Depending on the project, that can be trivial, but it may also require you to rewrite a lot of low-level code in the project and its dependencies.

nextaccountic 4 hours ago | parent | next [-]

This just means 32 bits is still relevant..

Also: why not riscv?

Anyway, I think that most pain for being low level and portable is due to C and C++, and it's not as painful in Rust. In Rust it's not as common to use non-portable integers like C's int (there is isize/usize but they are used for indexing; logic is supposed to be done in i32/u32/i64/u64), and the Rust stdlib comes with excellent support for dealing with byte orders like https://doc.rust-lang.org/std/primitive.i32.html#method.to_b... (and for more support, usage of https://docs.rs/byteorder/latest/byteorder/ is widespread), among other things

I think it's more immediately clear when Rust code is non portable too. It's not uncommon for random C code to be plagued with undocumented portability issues (and as such, you can't assume that code is portable without some inspection), but unportable Rust code may fail to build on unsupported platforms, which is an excellent idea

awilfox 4 hours ago | parent | prev [-]

Ooh, another +1 for reasons to maintain 32-bit support. Thanks for the tip.

Brian_K_White a day ago | parent | prev [-]

[flagged]

a day ago | parent [-]
[deleted]