Skip to content

Investigate gradual migration path of crux_http to http #357

@charypar

Description

@charypar

The HTTP capability currently uses http-types, which does not look actively maintained, and probably isn't the first choice for common HTTP types today. We also rely on a custom fork to avoid compatibility issues with emscripten (see #195).

From a quick look, it may be possible to switch to http, but maintain backwards compatibilty with http-types temporarily under a feature flag. That way we wouldn't force people to migrate or stay behind. It's not easy to see whether this is possible and how hard it might be without trying, which is what this issue is about.

It is quite likely to make the code very annoying to read for the duration of maintaining both versions.

Sketch implementation:

  • introduce a http-types feature flag to crux_http
  • guard all uses of the types from the crate with a feature flag and...
  • switch to either an equivalent from http or to our own type if an equivalent doesn't exist (I think this is the case for the Body type, which is just a generic argument in http)

If this becomes far too messy, we will have to just bite the bullet and make people migrate the types as a step change, providing helpful conversion traits where we can, etc.

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