If a host function is defined as host_fn(val: int) and this is called from rust PDK, the argument val isn't parsed correctly as in int.
The value for val is treated Big Endian int while in reality it is actually a little endian. To accurately parse the value, one would need to set the type of val to bytes and parse it by int.from_bytes(sock_id, "little")