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

Wasm support #45

Open
swfsql opened this issue Feb 12, 2024 · 0 comments
Open

Wasm support #45

swfsql opened this issue Feb 12, 2024 · 0 comments

Comments

@swfsql
Copy link

swfsql commented Feb 12, 2024

Hello, it would be nice if there was a wasm support on the library (or a wasm port of it).

I'm aware that many dependencies would not be compatible, nor the workflow itself (creating directories, indicating progress, etc). Also, I can't say there would be a lot of demand for this feature (I myself just want to experiment with some wasm).

For one thing, there are a few options for storage cache for a wasm app:

  • IndexedDB could work well, with indexed_db_futures being an option.
  • Cache storage is being used by the candle wasm examples, which could also work, but being limited to request-responses I think would be a different design from how hf-hub behaves.
  • Origin private fs could be the most relatable option, but I don't think there are good rust wrapping libraries for this.

I've started a drafty wasm port, and if it works reasonably well I'll attach a PR.
Thanks!

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

1 participant