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

Rust port of http-cache-semantics #16

Open
zkat opened this issue Nov 9, 2019 · 6 comments
Open

Rust port of http-cache-semantics #16

zkat opened this issue Nov 9, 2019 · 6 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zkat
Copy link
Contributor

zkat commented Nov 9, 2019

As part of our current push on the dstopic side of things, @yoshuawuyts and I are working on a caching http client that can cache its downloaded data down to cacache.

But there's a piece missing! make-fetch-happen was fortunate enough to be able to use an excellent package called http-cache-semantics which is a fairly complete implementation of http caching logic.

Your mission, should you choose to accept it, is to port http-cache-semantics over to Rust!

Now, I've already spoken with @kornelski about it, and they are sadly unable to pick up another project right now, but they were willing to share that they had already started working on a port, so this would be a great place to start, I think, for anyone willing to pick this up?

Are you interested in doing this? Can you do it in the fairly near future (since this is currently a blocker)? Reply below and let me know! We'd love your help! I'm totally willing to collaborate on this, as well. This is a fantastic way to learn Rust, if you're coming from the JS ecosystem, too.

(original thread)

@zkat zkat added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 9, 2019
@zkat
Copy link
Contributor Author

zkat commented Nov 9, 2019

This was nabbed by @non-binary, who's currently hacking on it over at https://github.com/non-binary/http-cache-semantics

@shieldo
Copy link

shieldo commented Dec 6, 2019

If @non-binary hasn't been able to work on this, I'd love to give it a go as I'm trying to learn/ move into Rust and, as you say @zkat, a port like this looks like a really useful exercise to get started with! I'm aware that there's been some other work (from @jameysharp) on building that out though (in the nb/tests branch), and wouldn't want to step on anyone's toes.

I can also see that the tests so far have been built out to assume an input much like the object prescribed in the JS library, and wondered if actually it might be more idiomatic/ useful to accept Rust http request/ response types?

@jameysharp
Copy link

In a funny coincidence, @shieldo, about the same time you posted this I started typing at fixing up the tests to match the API changes I proposed—which include @zkat's suggestion to use the request/response types from the http crate. 😁

I think I'll work on that a few more minutes and then push my work-in-progress to nb/tests, and maybe you can help me work through updating the rest of the tests? Further discussion I guess should be in non-binary/http-cache-semantics#2.

@shieldo
Copy link

shieldo commented Dec 6, 2019

@jameysharp That sounds perfect :) Sorry that I hadn't spotted that other issue, but can continue discussion there!

@pigeon-archive
Copy link

Awesome. Let me know if you'd like me to add you as a contributor to the repository. I just don't really have the energy to contribute right now but happy to answer questions as needed tho.

@shieldo
Copy link

shieldo commented Dec 6, 2019

@non-binary I understand, of course, and that's really nice of you to offer to help with questions! If it helps for me to be added as a contributor, even if only to non-master branches, please do so I can share work in the same place :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants