BlazeDB: A cross-platform embedded database, written entirely in Swift

Hi everyone,

Over the past several months I’ve been building BlazeDB, a cross-platform embedded encrypted database written entirely in Swift. It runs on Apple platforms, Linux, and Android, and has been a rewarding opportunity to explore areas of Swift that don’t often appear in application development.

The project includes a storage engine, write-ahead logging, crash recovery, query planning, encryption, Swift concurrency, cross-platform file I/O, a stable C ABI for interoperability with other languages, and an expanding suite of tests and benchmarks. Building BlazeDB has been a great way to dive deeper into systems programming while exploring what Swift can do beyond its traditional application-focused use cases.

As the project has matured, I’ve been systematically auditing both the implementation and its public API to ensure the documented behavior matches the code. Rather than keeping those findings private, I’ve been turning verified discoveries into well-scoped GitHub issues with supporting evidence, acceptance criteria, and clear labels. The backlog includes documentation, tooling, testing, Linux portability, concurrency, storage engine correctness, durability, performance, and API improvements. Several issues are marked as good first issue for anyone interested in becoming familiar with the project before tackling larger areas of the codebase.

We’ve already had external contributors begin submitting pull requests, and I’d love to continue making BlazeDB an approachable project for developers interested in lower-level Swift engineering.

If you’ve been looking for an opportunity to work on systems software in Swift, contribute to an embedded database, or explore topics like concurrency, storage engines, crash recovery, portability, or language interoperability, I’d be grateful for your feedback or contributions.

Repository:

Issues:

I’d also be interested in hearing what makes an open source Swift project approachable to you. Whether it’s documentation, issue organization, testing, or onboarding, I’d genuinely appreciate any suggestions for improving the contributor experience.

3 Likes

This is pretty cool! It is definitely a large undertaking, but really nice to see. I've been doing something similar (database related, but not a bag store like this) in a much more limited capacity.

You list Darwin, Linux/Android, I was wondering if you had tried to run this on Windows as well.

Unfortunately, I've not had a chance to dig through the code yet, but a brief peek seems to show some really interesting things. I really want to see where this goes!

Thanks for sharing!

1 Like

Thanks for the reply, and for the kind words! I haven’t targeted Windows yet, but it would be a cool expansion. Right now I’m focused on stabilizing the storage engine and APIs across the currently supported platforms first. Once things are a bit more mature, I’m be open to contributions toward Windows support; It would be interesting to explore what it would take to make BlazeDB work well there. I’d love to hear more about the project you’ve been working on!

Not as exciting per se - just a read-only ISO STANDARD SQL implementation; it doesn't solve all the hard problems that you are taking on (WAL, ACID, transactions, etc). But I don't want to take over the thread with a tangent.

That makes sense - better to get the project stable and then scale it. However, I'd suggest that you try the core early, just in case there are problems related to the storage aspect (Windows's file system layer is different than Unix).

1 Like

That’s a good point. I’ll keep that in mind as the project matures. And your SQL project sounds interesting too. I’d be curious to see it if/when you decide to share it!