Open
Description
Currently net requires dyn Device
and dyn Configurator
. This is required because net allocates the static
for the stack itself, so it can't be generic.
dyn
support is nice in the case you're builidng a device with "plug and play" connectivity modules, where you want one or another to be enabled on boot based on which module is plugged in. With monomorphization it'd cause lots of the net/smoltcp code to be duplicated.
However, it shouldn't be forced on the user to use dyn
. Maybe we can try to make Stack
generic over Device/Configurator and have the user allocate it in a static
. This way the user can use concrete types or choose to pass &mut dyn
as generic params to use dyn.