I'm very interested know if there's an easy way to get existing Swift standard library working on platforms that don't support threading, like AVR and WebAssembly.
From what I saw in the standard library and runtime source code, there's a strong assumption of threading support in stdlib, e.g. all reference counting code relies on working
<atomic> header, which can't be imported on platforms without threading:
#ifdef _LIBCPP_HAS_NO_THREADS #error <atomic> is not supported on this single threaded system #endif
Maybe someone have already done some work to port the standard library and runtime to an environment without threading support or maybe there's some preprocessor or build script configuration flag that I missed?