Why Is Rust Treated Like a Feature by Some People?
Today’s Issue: Why I Am Not Yet Ready To Switch to Zig From Rust, The Next-Gen Cloud [Data+AI] Analytics, and Manage Environment Variables Directly in Cargo.toml
Happy Juneteenth Rustacean!
Welcome to another edition of the Rust Bytes newsletter. In this issue, we’ll examine a recent Rust discussion, present a Rust Tip, spotlight an amazing Rust project, and highlight some incredible links of the week.
Welcome to issue 35.
THE MAIN THING
Why Is Rust Treated Like a Feature by Some People?
A recent discussion on r/rust titled "why is rust treated like a feature by some people?" brings to light an interesting outlook of the software development world right now. The original post replies expresses confusion about the trend of promoting a program's use of Rust as a major selling point, particularly for less critical applications.
This has raised some thought-provoking questions questions about perception, community, and the true value proposition of Rust. The comments got me thinking, so here's my two cents.
Rust's Strengths: A Double-Edged Sword?
There's no denying Rust's technical prowess. Rust has some better things to boast including memory safety, blazing-fast performance, and a focus on developer productivity. These attributes make it a dream language for system-level programming, where reliability and efficiency are paramount. However, the original discussion rightfully questions the emphasis on Rust for seemingly simpler tools.
Lost in Translation?
The discussion hinted at a potential disconnect between the Rust community and outsiders. Enthusiastic Rust developers might overemphasize the language itself, neglecting to clearly communicate the specific benefits it brings to the end user. For some users, the focus might be on speed improvements or resource efficiency, which may not be the primary concern for all users.
Fanaticism or Informed Choice?
The discussion wonders if the "Rust as a feature" trend comes from unwavering enthusiasm in the language. While there's certainly a passionate Rust community, it's likely there's more to it. Developers might genuinely believe Rust is the best tool for the job, even in simpler cases. However, clear communication becomes crucial to ensure users understand the specific advantages they're getting.
Finding the Balance
There's a sweet spot between highlighting the power of Rust and promoting the actual features of the program.
The discussion however sparked a healthy conversation about how we present technology. Clear communicating and focusing on user benefits, will ensure Rust developers and their creations are valued not just for the language they're built on, but for the problems they solve.
In our previous issue you were tasked with writing a function(is_valid_ipv4) to identify valid IPv4 addresses in dot-decimal format. While awaiting your solution, we proactively developed this approach. We're still open to see your approach and thoughts as well.
Rust Tip
Manage Environment Variables Directly in Cargo.toml
While .env
files are popular for configuration, Rust's Cargo.toml
offers a built-in way to define environment variables for your project. This can be useful for several reasons:
Centralized management to keep environment variables alongside your project settings in
Cargo.toml
.Integration to allow access to these variables directly in your build scripts.
You can avoid the need for separate
.env
files, especially in simpler projects.
Here's an example usage of [env]
in Cargo.toml
[env]
# Set an absolute path for OpenSSL
OPENSSL_DIR = "/opt/openssl"
# Forcefully override existing TMPDIR variable
TMPDIR = { value = "/home/tmp", force = true }
# Set a relative path based on project directory
OPENSSL_DIR = { value = "vendor/openssl", relative = true }
This configuration keeps your environment variables within your project and integrates nicely with Cargo's build system.
What are you waiting for? Go and put this tip to test!
PROJECT SPOTLIGHT 💡
Databend: Skip the Small Talk, Dive into Big Data!
Databend is an open-source cloud data warehouse that serves as a cost-effective alternative to Snowflake. With its focus on fast query execution and data ingestion, it's designed for complex analysis of the world's largest datasets.
Databend is the data warehouse that cuts to the chase, just like it skips you straight to the content.
Databend got a lot to boast about:
Handles even the most challenging queries on enormous datasets with ease.
Scalable storage and computation to keep your wallet happy, while performance stays stellar. It's the data warehouse on a budget!
Utilize the power of advanced analytics with built-in AI functions. No PhD in data science required!
Integrates with AWS S3, Azure Blob, Google Cloud, and more.
Streamlines data ingestion, no external ETL needed.
Supports multiple data formats and types, including JSON, CSV, Parquet, GEO, and more.
Ensures data integrity with atomic, consistent, isolated, and durable operations(ACID Transactions).
Provides Git-like version control for data, allowing querying, cloning, and reverting at any point.
The cherry on top? Databend is open-source, so you can fork and play with it as you will.
AWESOME LINKS OF THE WEEK 🔗
Pekka Enberg's article Why I am not yet ready to switch to Zig from Rust is a must-read for anyone who enjoys a good, slow burn.
Evan Doyle wrote an insightful guide on Parsing Python ASTs 20x Faster with Rust.
Henk from Tweede Golf’s team released teach-rs, a project aimed at Rust teachers to share and improve their Rust teaching material.
Wu released htmd- A turndown.js inspired HTML to Markdown converter for Rust. Look like Rust is going places!
Christian Thiel wrote about Iceberg Catalog: The TIP of your Lakehouse.
Guillaume Endignoux wrote about Making a const version of Rust's array::from_fn - How hard can it be?.
Francis Ọnukwu released linkly-rs - a URL shortener app built with Rust, Postgres and Redis.
Everett Pompeii from InfoQ wrote Zero to Performance Hero: How to Benchmark and Profile Your eBPF Code in Rust.
In other news, Microsoft Surface's UEFI implementation is all set to rock the Rust world! Looks like the future is blazing fast and rusty.
The guide Master hexagonal architecture in Rust has everything you need to write flexible, future-proof Rust applications using hexagonal architecture.
Do you have a challenging Rust problem or a helpful tip you'd like to share with fellow Rustaceans? We'd be more than happy to feature them in a future issue, with full credit given to you. Submit your challenges or tips to us via email.
BEFORE YOU GO 👋
You're our biggest fans, and we love to see it.
Here are a few ways you can help us spread the word:
❤️ Recommend Rust Bytes to your friends.
🤳 Connect with us on our socials: X, Rustaceans Publication.
📨 Contact us through rustaceanseditors@gmail.com feedback is welcome.
☕️ Buy Us Coffee.
That's all for now, Rustaceans. Keep it rolling till we meet again on Sunday.
John & Elley.