Initial release of diesel-async

I'm happy to announce the first release of diesel-async

Diesel is a Safe, Extensible ORM and Query Builder for Rust
diesel-async is an pure rust fully async connection implementation for Diesel. It provides connection implementations for the Diesel PostgreSQL and MySQL backend. It is designed to be used as drop in replacement for the sync connection implementations in Diesel. diesel-async support almost all the functionality provided by diesel (beside migrations), so it features the same compile time guarantees as Diesel itself. It reuses Diesels query builder infrastructure here.

In comparison with other async database connection libraries like SQLx and SeaORM, diesel-async provides the following advantages:

  • Integration with Diesel
  • PostgreSQL pipelining support (sending multiple queries at once, waiting on the results later on)
  • According to our benchmarks better performance

This is currently a personal project of mine and not part of the Diesel project. I may upstream this work someday, but want to gather some feedback on the implementation first.

To be upfront about potential questions here:

  • I do want to use this crate, but AGPL-3 is no fitting licence for me. Can you relicense the crate?

This is the first release of this crate. I do not consider the code production ready yet, so I've chosen a licence that makes it less likely that someone starts using this in production. I'm open to changing the licence later on after the following goals are met:
+ Iron out potential bugs by letting people experiment with the existing state
+ Find additional motivated people that help keeping Diesel itself maintained. If your are interested in helping out here, please reach out to us.

  • When can we expect a stable production ready 1.0 release?

I consider a stable 1.0 release to be blocked on at least the following issues:
+ No support for native async fn in traits yet (at least not without boxing)
+ No real support for async callbacks yet (at least not without boxing)
+ No good way to handle cancelling running transactions (This likely needs async drop)

  • Why does diesel-async not provide a SQLite connection implementation?

SQLite does only provide a sync database interface. This makes it a terrible fit for designing an async API around it. Most existing implementations show significant performance looses due to such a design.

I'm happy to answer any additional question.

5 Likes

This seems like a very weird choice to me.

Are you aware that, legally speaking, you can't change the license without the explicit consent of everyone who has contributed to the project? If you intend to relicense the project in the future and don't have a CLA, then you should be quite careful with accepting patches from other people.

1 Like

I'm aware of that. The project currently contains 4 commits form other people. All of them are trivial spelling fixes or version bumps. None of that is really relevant for relicensing.

1 Like