Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
This directory contains standard, low-level C libraries with emphasis on being independent and efficient. They can be used by any port.