hf-hub
hf-hub copied to clipboard
Wasm support
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!