<thejpster[m]>
I’d make a static slice of slices and flatten the iterator to set them all at run time
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
<rmsyn[m]>
right, but they were asking about how to achieve a compile-time solution ...
<thejpster[m]>
Compile time what though? You can’t get data into the MMU at compile time.
<thejpster[m]>
And it’s unlikely that MMU set up is performance critical.
<thejpster[m]>
So to me it’s just a question of “code size” vs “data size”.
<rmsyn[m]>
alright, yeah I guess that's answering a different question of "why do you want a compile-time solution".
jasperw has joined #rust-embedded
jasperw has quit [Client Quit]
<rmsyn[m]>
I think the general case is still interesting, though. like there are entire crates dedicated to how to const-initialize an array programmatically using macros that take function arguments for how to initialize the elements
<thejpster[m]>
Yeah but we have const blocks now so initialising a bunch of slices is now fairly easy
<rmsyn[m]>
sure, I guess you also move the initiializer into a `const fn do_init<const N: usize>(..args) -> [T; N]` type function