fireproof-storage / fireproof

Realtime database, runs anywhere. Install Fireproof in your front-end app or edge function, and sync data via any backend.
https://fireproof.storage
Other
219 stars 16 forks source link

SQLite / bun backend #114

Open jchris opened 1 month ago

jchris commented 1 month ago

The gist is: on node.js we use the fs API to store to tiny files, but maybe there's a faster way.

I've been wanting to try a bun/sqlite backend for local data, it could be implemented just with the interface in the linked module above.

To test it, you'd need to export it from package.json

And then link it like the others. And alias it in a bun build like this, and add it to the exports.

jchris commented 1 month ago

obviously anyone who does this will come up with idea to simplify the build / dependency / plugin authorship experience. that would be very helpful

jchris commented 1 month ago

Once the build is in place, you can benchmark it by importing the new sqlite version here https://github.com/dstanesc/fireproof-playground/blob/main/index.js#L1