athenavm / athena

Athena monorepo
https://www.athenavm.org/
Apache License 2.0
21 stars 2 forks source link

Little-endian assumptions #141

Open lrettig opened 1 month ago

lrettig commented 1 month ago

There are probably a bunch of places where we assume LE byte order, and I doubt athena would work on a native BE host today without some fixes. Opening an issue to document this and so we're aware of it. See https://github.com/athenavm/athena/pull/137#discussion_r1795899817 and also https://github.com/risc0/risc0/issues/420 (we are not alone here).

jellonek commented 2 weeks ago

So this task is about finding all such places and cover them using https://docs.rs/byteorder/latest/byteorder/type.NativeEndian.html

lrettig commented 2 weeks ago

Right, but remember that the byte order for compiled Athena programs must be LE, and also that we use LE in serialization.