Static memory layout for "Non-allocating Embedded Swift"?

Fixed memory layouts do kind-of exist today embodied in tuples; however that is far from ergonomic or safe to use them as that. During the bringup and validation phases for embedded mode, we did hit pretty early on this limitation and needed exactly the types you mentioned (as well as String). Some of those needs have started to percolate into discussions around additional types that have a "fixed size" type and some experiments have been started to investigate what would be a sustainable direction to propose, however that is not fully ready yet to pitch.

Some parts of that are ready to pitch, for example [Pitch #2] Safe Access to Contiguous Storage. That is one key feature that would needed by a fixed size type.

1 Like