I am considering using Zig in a project where servers and clients that run on different architectures and operating systems need to produce the same output given same input (i.e. files on disk, network data, etc.).
What can I expect from Zig cross-compilation in this regard? How does Zig handle floating-point determinism across different platforms and hardware?
i dont think zig can realisticaly provide that since its up to the architecture regarding the behaviour of oporations. however most modern hardware abides by the IEEE 754 standard, on such hardware the behaviour should be the same, ie x86, arm, riscv should behave the same.
You need to use fixed point. I would personally avoid the rabbit hole of determinism with hardware floating points [1], but some people may find success with @setFloatMode(.Strict)