Skip to content

Integrate The Utils Crate #91

@mcmah309

Description

@mcmah309

The utils crate is likely going to become a jumbled mix of utils. Technically, pretty much all features here could be classified as utils, so the decision to add any there by name alone is arbitrary. It might be a better idea to just have it in the sdk directly (we could still feature guard them here if we really want to). I expect the entry point for users using any of these crates to be the sdk, so crates really only should be used here to simplify maintenance, like conditional compilation, e.g. a feature that is not support all dioxus platforms. That said, channels, time, and storage could probably also be merged directly into the sdk. As these are supported on all platforms and technically are "utils" as well. We could feature guard everything, but that seems cumbersome. I don't see much of an issue just putting more things in the sdk if it's easier to maintain. Also worth noting, LLVM does dead code elimination anyways.

Taking a step back, my honest opinion is, I’m not really sure why the sdk crate exists. Why does an API live here instead of Dioxus? Because it is built on top of it? Well many Dioxus API’s could also technically be pulled out and put here too.

If some of this functionality is used often enough, it should probably just be integrated directly into Dioxus. In the meantime it makes more sense for each crate live on its own. Not wrapped up in an “sdk”.

We could keep the Dioxus sdk repo name, but just have a collection of dioxus-* crates. This would also simplify versioning. So a breaking change in one is not necessarily a breaking change in the entire “sdk”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions