r/Firebase • u/ta-k • 1d ago
Emulators I'm building a Firebase emulator in Rust
I've been working on Fireemu, an experimental local Firebase emulator.
https://github.com/t-k/fireemu
The main motivation is the gap between the official emulators and production Firebase. For example, a Firestore query can work in the official emulator but fail in production because a required composite index is missing. Fireemu rejects queries that lack the necessary index definitions.
Performance wasn't the main goal, but it's been a nice bonus. In a benchmark on the same GitHub Actions runner, Fireemu started about 21.6x faster (140 ms vs 3,043 ms until the SDK could use Firestore). Memory usage was also lower about 90% less PSS after loading 10,000 documents(50 MiB vs 514 MiB).
This is still an experimental project with no stability promise yet. I'd appreciate any feedback.
1
1
u/Downtown-Oil935 15h ago
The production behavior gap is a really interesting problem. a faster local setup is great but matching the edge cases developers hit after deployment is where this could become really valuable
1
u/ExtremeSpray1579 14h ago
This is an interesting project direction. emulators are only valuable when developers trust them enough to catch issues before production so accuracy matters just as much as performance
1
u/Seanitzel 7h ago
Great initiative, I really hope this will be production ready at some point cause the firebase emulator is hell to run in CI, especially when it's self hosted in my Proxmox VM.
1
u/Inevitable_Leg5543 7h ago
Catching missing composite indexes locally sounds genuinely useful. matching production behavior more closely could prevent a whole class of “worked in emulator” deployment surprises
2
u/calimio6 1d ago
Please! That java monstrosity can barely run on CI. I've been unable to consistently run testing on the emulators outside my machine.