r/javascript • u/Brave_Magician2474 • Nov 01 '26
I built a client-side cache in Rust and compiled it to WebAssembly
https://blaze-cache.github.io/docsHey everyone,
I built **Blaze Cache**, a client-side caching library written in Rust and compiled to WebAssembly.
The main idea was to get a fast, predictable cache in the browser with:
- Synchronous get/set after initialization (no Promises on the hot path)
- SIEVE eviction
- TTL + tag-based invalidation
- Optional IndexedDB persistence
- Adapters for Axios, fetch, TanStack Query, and SWR
I was mostly curious whether moving the cache core into Wasm would help with performance and structure compared to typical JS cache implementations.
Would love feedback from people who’ve worked on caching, Wasm, or frontend performance.
2
u/Ronin-s_Spirit Nov 01 '26
Does that not defeat the purpose of using Rust?
1
u/AutoModerator Nov 01 '26
Project Page (?): https://github.com/blaze-cache/docs
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/rcindy1 4d ago
A useful comparison is end-to-end cache hits with realistic values; timing the Rust core alone can miss JS/Wasm boundary and value-conversion costs.