DEV Community

Joel Jaison
Joel Jaison

Posted on

2 1

Revamped Rust: Faster, Safer, and More Stable with Latest Updates!

Exciting news for Rust developers! Rust 1.68.0 stable has been released, bringing with it a number of new features and improvements.

One of the major updates is Cargo's new sparse protocol, which significantly improves performance when accessing crates.io. Instead of downloading a full index from a GitHub repo, Cargo now fetches files directly over HTTPS and only downloads information about the specific crate dependencies in your project. It's worth noting that this protocol will become the default for crates.io in the 1.70.0 release.

Another noteworthy feature is the local pin construction with the pin macro, which allows you to pin a future to a specific memory location, preventing it from being moved. This is crucial for making async blocks safe, as it ensures that references are not invalidated. The standard library's new Pin macro makes it easy to use without relying on a third-party dependency.

Lastly, the default alloc error handler has been updated. If your program includes the standard library and an allocation fails, it will print to stderr and abort. However, if your program does not include the standard library, it will panic on failure. This default behavior can be adjusted with the PanicHandler macro if desired.

In addition, Rust 1.68.0 includes some API stabilizations.

If you're interested in learning more about these updates, be sure to check out the official release notes at https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html.
Rust 1.68.0

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more