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

Add support for non-async writing #10

Open
rambip opened this issue Aug 5, 2023 · 3 comments
Open

Add support for non-async writing #10

rambip opened this issue Aug 5, 2023 · 3 comments

Comments

@rambip
Copy link

rambip commented Aug 5, 2023

Hi !
I need a library to write CAR files in rust, and this crate looks really promising.

The issue is that I need to run this code client-side (and in the future on webassembly), so an async implementation is a dealbreaker for me.

Would that be possible to export a non-async writer ?

@dignifiedquire
Copy link
Contributor

You can use async code in webassembly as well, using the futures executor. Could you expand on the setup you need to run in, where you can't use async?.

@rambip
Copy link
Author

rambip commented Aug 25, 2023

I'm building a static-site generator, (as a native rust app) and the idea is to publish some content to ipfs, getting the CIDs, and the building the website.
I use the HTTP api of <web3.storage> to upload the car (with reqwest )
So there is really no need for async for me.

@dignifiedquire
Copy link
Contributor

So there is really no need for async for me.

sure, but the sync api in reqwest just blocks under the hood

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