Skip to content

net: try to remove dyn usage #351

Open
@Dirbaio

Description

@Dirbaio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions