Rust 1.75 (Dec 2023) y Rust 1.76 (Feb 2024) brought improvements incrementales pero notables. Highlights: async fn en traits stabilized, return position impl Trait mejoras, pointer_bytes, debug info enhancements. Este artículo cubre qué matters para developers productivos.
Rust 1.75: async fn in traits
Long-awaited:
trait AsyncDatabase {
async fn query(&self, sql: &str) -> Result<Data>;
}
impl AsyncDatabase for Postgres {
async fn query(&self, sql: &str) -> Result<Data> {
// impl
}
}
Previously needed async-trait crate. Native ahora.
Return position impl Trait in Traits
Combined:
trait Container {
fn iter(&self) -> impl Iterator<Item = i32>;
}
Before required workarounds. Clean now.
1.76: pointer types
Better byte handling:
let ptr: *const u8 = ...;
let addr = ptr as usize; // before
let bytes = ptr.byte_add(4); // more expressive now
Safety improvements en pointer arithmetic.
Debug info improvements
- Better inlining debug: backtraces más accurate.
- Types in debug: tools show more info.
- Async stack traces improved.
Debugging experience notably better.
Compile times
Incremental improvements cada release. 1.75 → 1.76:
- Simple projects: 2-3% faster.
- Large projects: 5-10% faster típicamente.
- Proc macros: varying.
Incrementals acumulan.
Ecosystem
Crates adapting:
- tokio: async fn in traits adoption.
- axum: cleaner trait signatures.
- async-trait usage declining (native replacement).
- async libraries: simpler APIs.
Stabilizations
Recent stabilizations:
Ipv4Addr::BITSconstants.Result::map_errimprovements.- Various
unsafefunction improvements.
Continuous language polish.
Para developers productivos
Cambios que matter en el día a día:
- Cleaner async trait code.
- Better error messages en cada release.
- Faster builds acumulado.
- More stable cada version.
Upgrade cost: minimal. Benefit: real.
Edition changes
Rust 2024 edition in preparation (stabilized en Rust 1.85, Feb 2025). Changes planned:
- Better
if letergonomics. - Reserved keywords.
unsafeattribute requirements.
1.75/1.76 incremental prep.
Compatibility
Backwards-compatible (Rust guarantees):
- Code 1.0 compiles.
- Editions for breaking changes (opt-in).
- Stable features remain stable.
Upgrade any time safe.
Ecosystem crate updates
Para libraries common:
- serde: continuous.
- tokio: async fn trait adoption.
- reqwest: minor.
- clap: refinements.
- anyhow / thiserror: stable.
Updates non-breaking typically.
Productivity features
Small quality-of-life:
- let-else: cleaner error handling.
- expanded cfg: better conditional compile.
- #[diagnostic]: better error messages from crates.
Accumulate significantly over versions.
Industry impact
Rust adoption continuing:
- Linux kernel: progress (covered separately).
- Microsoft: rewriting components en Rust.
- Google: Android components.
- Cloudflare, Discord, Figma: production use.
- AWS: Bottlerocket, Firecracker.
Stable growth.
Conclusión
Rust 1.75/1.76 son releases low-drama, high-quality-of-life. async fn en traits eliminated major friction. Performance y debug info incrementally better. Para productive Rust teams, upgrade same-month sin riesgo. Cambios acumulan: Rust cada 6 months es perceptibly mejor que previous. Stability + evolution balance that characterizes Rust maturity.
Síguenos en jacar.es para más sobre Rust, systems programming y language evolution.