Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Using http crate types for Response etc. #285

Open
m00nwtchr opened this issue Nov 4, 2024 · 5 comments
Open

[Request] Using http crate types for Response etc. #285

m00nwtchr opened this issue Nov 4, 2024 · 5 comments

Comments

@m00nwtchr
Copy link

I'm using several other crates that are meant to interoperate with the types provided by the http crate, which makes using them with crux_http difficult. Using the semi-standard Response/Request/etc. types from the http crate in crux would rectify that. Alternatively, Into/From implementations could provide a good enough experience via conversions (ideally non-copying).

@charypar
Copy link
Member

charypar commented Nov 5, 2024

This is definitely on our to-do list, but it would be quite a breaking change to crux_http, and will make providing a smooth migration path quite tricky.

It's likely we will first release a http compatible alternative capability, and then migrate crux_http.

On the Into / From front, that sounds like good short term patch. Would you be interested in trying? We'd welcome a PR.

@m00nwtchr
Copy link
Author

Sure.

@m00nwtchr
Copy link
Author

m00nwtchr commented Nov 5, 2024

Just noticed that the "http" name in crux_http is actually an alias of http-types, which is a different http "base-crate" from http. To be clear, do you mean that you want to eventually switch to http (and so I should focus on bringing in compatibility with that, directly), or are you going to more fully embrace http-types?

(My original problem requires compatibility with http, but http-types has conversion implementations for http already, so I can go crux_http -> http-types -> http)

@m00nwtchr
Copy link
Author

@charypar

@charypar
Copy link
Member

Yes, we do want to eventually switch to http as the base types crate, but we expose a fair bit of http-types in the public API of crux_http, so the change is pretty major. IIRC so much so that it's basically a total rewrite of the core-facing public API, and possibly even the FFI interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants