DEV Community

Cover image for Introducing Nightly and Beta Rust Crates
Feranmi Okafor for SurrealDB

Posted on

Introducing Nightly and Beta Rust Crates

We are pleased to announce two additional Rust crates, surrealdb-nightly and surrealdb-beta. These crates are designed to complement the surrealdb crate. Starting with v1.1.0 we plan to publish a stable release on the second Tuesday of every month. These stable releases are only published to the stable surrealdb crate.

If you use SurrealDB in production, this is the ideal crate for you. You can add it to your project using cargo add or by simply adding a line like this one to your dependencies section:

surrealdb = "1"
Enter fullscreen mode Exit fullscreen mode

Nightly Crate


If you prefer living on the bleeding edge, this crate is perfect for you. It follows our development branch very closely. It’s automatically published every night but only when there are new changes to the development branch. It makes it easy to test new features as an embedded library or as a client when running a nightly binary on the server.

When using nightly or beta crates, we recommend adding a line similar to this one to your dependencies section in Cargo.toml:

surrealdb = { version = "1", package = "surrealdb-nightly" }
Enter fullscreen mode Exit fullscreen mode


This makes it easy to switch between the three crates by simply changing the package name. You could start your development using surrealdb-nightly if the nightly version has a feature you want that hasn’t stabilised yet, later switch to surrealdb-beta once it reaches beta and finally switch to surrealdb once it’s stable. All this by simply changing the package name. This way you won’t have to update your feature flag names if you have features that activate SurrealDB features. For example memory = ["surrealdb/kv-mem"].

Beta Crate


Every month we will freeze features on the development branch by creating a new branch which will only receive bug fixes from that point onwards. This gives us a month to polish our releases before they hit the stable crate. Updates in that branch are pushed to the surrealdb-beta crate. New features in this crate are not guaranteed to reach the stable crate. Such features may be reverted to give them more time to develop if we think they are not ready to stabilise yet.

Conclusion


The nightly and beta crates are great for testing new features and bug fixes. However, these are, by definition, pre-releases. Use them responsibly 😄.

Top comments (0)