user58790: Looking at the source code of bitcoin core, the serialization part, I see that there's no serialization abstraction layer that accounts for a possible different endianness or different binary layouts on different machines.
This is not only for disk serialization, but also for network serialization. 
If bitcoin core was used on a big-endian machine, or a machine with int size not equal to 32-bit, it'll fail to connect to the network because all sizes will be incorrectly interpreted and values will be different.
Am I missing something or did I arrive at the correct conclusion?

user38618: ser_writedata8 does not care about endianness, in contrast to ser_writedata16, ser_writedata32, ser_writedata64. Single bytes don't need to swapped, as 8 bits have one address and there's no way to access specific bits without using BMI or arithmetic operations. Therefore, bit endianness is not important except in bitfields.

user208: It should work on big-endian systems. The serialization code for integers will byteswap on such systems. This was certainly tested at some point, but I'm not sure how recently someone has.
I don't think it will work on systems where int is different than 32-bit.

58790: <p>Looking at the source code of bitcoin core, <a href="https://github.com/bitcoin/bitcoin/blob/master/src/serialize.h#L195" rel="nofollow noreferrer">the serialization part</a>, I see that there's no serialization abstraction layer that accounts for a possible different endianness or different binary layouts on different machines.</p>

<p>This is not only for disk serialization, but also for network serialization. 
If bitcoin core was used on a big-endian machine, or a machine with <code>int</code> size not equal to 32-bit, it'll fail to connect to the network because all sizes will be incorrectly interpreted and values will be different.</p>

<p>Am I missing something or did I arrive at the correct conclusion?</p>
 38618: <p><code>ser_writedata8</code> does not care about endianness, in contrast to <code>ser_writedata16</code>, <code>ser_writedata32</code>, <code>ser_writedata64</code>. Single bytes don't need to swapped, as <a href="https://stackoverflow.com/questions/16803397/can-endianness-refer-to-bits-order-in-a-byte">8 bits have one address</a> and there's no way to access specific bits without using BMI or arithmetic operations. Therefore, bit endianness is not important except in <a href="https://stackoverflow.com/a/16804571/6557621">bitfields</a>.</p>
 208: <p>It should work on big-endian systems. The serialization code for integers will byteswap on such systems. This was certainly tested at some point, but I'm not sure how recently someone has.</p>

<p>I don't think it will work on systems where int is different than 32-bit.</p>
