Search

Items tagged with: rustlang



🦀 I've improved the implementation behind all the string formatting macros in Rust: println!(), panic!(), format!(), write!(), log::info!(), and so on. (That is, everything based on format_args!().) They will compile a bit faster, use a bit less memory while compiling, result in smaller binaries, and produce more efficient code! 🎉

'Hello world' compiles 3% faster and a few bigger projects like Ripgrep and Cargo compile 1.5% to 2% faster. And those binaries are roughly 2% smaller. 🎊

This change will be available in Rust Nightly tomorrow, and should ship as part of Rust 1.93.0 in January.

#rustlang


Async is powerful — but are we overdoing it?
@veeso_dev explores the async trap in Rust, how it hurts library APIs, and how tools like maybe-fut can help.
⏳ We Can’t Live Without Async — and That’s a Problem
#rustlang #rustlab2025


I'd like to parse ipv4 addresses given as command line argument values.
I have got two arguments accepting ipv4 address.
If I specify single such option all is fine.
If I specify both, I 'm getting error like this:

thread 'main' (624061) panicked at /home/peto/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap-3.2.25/src/parser/matches/arg_matches.rs:1879:13:
Must use `Arg::allow_invalid_utf8` with `_os` lookups at `[hash: A8F400C40154F09]`

This is simplified version of my code showcasing the issue:
```
use std::net::{IpAddr, Ipv4Addr};
use clap::{App, AppSettings, Arg, value_parser};

#[tokio::main]
async fn main() -> Result<(), Error> {
let mut app = App::new("Server APP")
.about("My super cool app")
.setting(AppSettings::DeriveDisplayOrder)
.setting(AppSettings::SubcommandsNegateReqs)
.arg(
Arg::with_name("socket")
.required(true)
.takes_value(true)
.long("socket")
.help("Unix socket path"),
)
.arg(
Arg::with_name("relayaddress")
.required(false)
.takes_value(true)
.long("relay-address")
.value_parser(value_parser!(Ipv4Addr))
.help("External relay ipv4 address used together with --listen-address to run behind a nat"),
)
.arg(
Arg::with_name("listenaddress")
.required(false)
.takes_value(true)
.long("listen-address")
.value_parser(value_parser!(Ipv4Addr))
.help("Local listen ipv4 address used together with --relay-address to run behind a nat"),
);
let matches = app.clone().get_matches();
if matches.is_present("relayaddress") & matches.is_present("listenaddress") {
let external_ip = IpAddr::V4(matches.get_one::<Ipv4Addr>("relayaddress").expect("Invalid address"));
let local_ip = IpAddr::V4(
matches.get_one::<Ipv4Addr>("listenaddress").expect("Invalid address"));
println!("Listening on local IP: {local_ip}");
println!("Relaying through external IP: {external_ip}");
}}
```

#rust #rustlang #programming #fedihelp



I'm excited to share what I've been working on with @erikjee: RustNL's #rustlang Maintainers Fund!

Many people and companies contribute to Rust, but there are fewer and fewer paid positions for general maintenance (reviews,cleanups,etc). We need to fix that.

General maintenance is one of the most fundamental jobs in an open source project, but is one of the hardest to get paid for. Adding new features gets you promoted; keeping the lights on does not.

But everything depends on it. Code needs reviews, cleanups, docs. New contributors need mentors, etc.

A significant number of Rust maintainers who got paid for that have lost or quit their job recently. Due to RTO policies, a shift in responsibilities, budget cuts, and/or burnout. This is already quite noticable in the Rust project: longer review queues and more technical debt. This is a problem.

Through RustNL, the non-profit foundation behind the largest Rust conference (RustWeek) and the Rust Project's All Hands, we are setting up a fund to provide stable jobs for Rust maintainers. We want to employ six full-time maintainers in 2026.

Additionally, we'll provide internships and mentorship, to help retain promising new contributors. Not only do we need to make sure the current generation of maintainers doesn't burn out, we need to work on the next generation of maintainers too.

What we need now is companies who rely on Rust to step up and contribute financially. Having your business rely on the work of unpaid volunteers is not sustainable in the long term. It's a risk.

And if your company contributes to Rust, keeping the project well-maintained will accelerate your work.

Over the last few months, we have spoken to the Rust Foundation and several big companies about our plans. The input we've received and the positive reactions so far makes us believe we can make this happen. Today, we are publishing our plans for a wider audience, in search for the required funding.

If your company is interested in funding Rust maintainers, please reach out to me or @erikjee!

You can find our sponsors prospectus here: rustnl.org/resources/Rust-Main…

Let me know if you want to talk! 💛

(Message me through Mastodon, Rust Zulip, or email: mara@rustnl.org)

rustnl.org/fund/


#Rustlang people, how would you react if a project you use or contribute to migrated from #Github to #Codeberg?

Boosts welcome, let's collect some opinions.

  • I would only welcome such a move (81%, 52 votes)
  • It would be annoying but I'll live with it (7%, 5 votes)
  • I won't touch or interact with it any more (1%, 1 vote)
  • I could not care less (9%, 6 votes)
64 voters. Poll end: 1 month ago


There's an active phishing campaign happening against crates.io. rustfoundation.dev is not the foundation's or the project's domain. We're looking at our options for takedowns.

#RustLang

bsky.app/profile/burntsushi.ne…

github.com/rust-lang/crates.io…


🎥 New Video Online – Rust in Paris 2025 🦀

At the latest edition of Rust in Paris, Benjamin Bouvier @bnjbvr explained why Rust compile times can be slow — and how to speed them up without sacrificing quality.

👉 Watch the full talk here: youtu.be/EHu15-E89YY

Huge thanks to Benjamin for breaking down the compiler process and sharing practical tools to help Rust developers build faster 🙌

#RustLang #RustInParis #RustProgramming #OpenSource #RustCommunity #Compiler #Performance


Wanted: a #RustLang tool with 4 panes:
- desired generated code
- an in progress proc-macro being written
- input #Rust code where the proc-macro is being applied
- a live updating view of the actual generated code with diff annotations against what was desired

If you want to go fancier, tie things in the output to the input and provide suggestions on where things are missing pre-expansion for the output to march the expectation. I feel like 90% of this can be accomplished today with tmux+a file watcher+direct rustc invocations using -Zunpretty=expanded, but it'd be lovely to have an actual tool for this.



Calling all analog film photographers! 🎞️ I've been working on Filmbook, an open-source app to help you keep track of your film usage. It's built with Rust & GTK4/libadwaita for a smooth & modern experience – and it even runs on Linux phones like the Librem 5 and Pinephone Pro! 📱
The first version is ready for testing, and I'd love your input on what features would make it even better! Join the community & help shape Filmbook: codeberg.org/bjawebos/filmbook ✨ #filmphotography #analogphotography #rustlang #gtk #opensource #community #testing #featureideas #librem5 #pinephone #linuxphone




new #rustlang crate drop: iddqd! ID-based maps where keys are borrowed from values. Four maps are included: IdOrdMap, IdHashMap, a bijective (1:1) BiHashMap and a trijective (1:1:1) TriHashMap.

At Oxide we've found this pattern to be extraordinarily useful. iddqd is no-std compatible, too!

docs.rs/iddqd


Ooooh my tell-all interview about the creation of Ferris the Rustacean has been posted 😆

rustfoundation.org/media/celeb…

#rustlang





Newest #rustlang `http` release v1.3.0 out today!

Perhaps biggest deal is allowing more characters in the `Uri`, because frankly that's the real world.

github.com/hyperium/http/relea…




Inspecting flamegraphs is a pain - dealing with SVG files, opening a browser… ugh.

Not anymore!

🔎 **flamelens** — An interactive flamegraph viewer for the terminal.

🔥 Works with perf, py-spy and cargo-flamegraph.

🦀 Written in Rust & built with @ratatui_rs

⭐ GitHub: github.com/YS-L/flamelens

#rustlang #ratatui #tui #flamegraph #profiling #development #terminal #commandline



Interested to take a little tour through how #deltachat apps and the #rustlang core library are wired together?

@treefit and @WofWca provide a deep-dive into the history of apps migrating from a C-Foreign-Function-Interface to a #Rust based JSON-RPC mechanism, with entertaining horror stories like how an iOS release some years ago could delete profiles without the user intending it 😬

The post also highlights a few areas where folks interested to help could start ... delta.chat/en/2025-02-11-why-j…


You know what I like to do in my terminal late at night?
I try to find my way through an infinite maze.

🧌 **minotaur**: Multiplayer SSH game, beware of the minotaurs!

🎮 Let's play together: *ssh frittura.org -p 2020*

🦀 Written in Rust & built with @ratatui_rs

⭐ GitHub: github.com/ricott1/minotaur

#rustlang #ratatui #tui #ssh #game #terminal


This marks my very first technical blog post, Interning at @servo has been an absolute joy—I’ve learned so much about browsers, Rust, and the open source community, and I’m beyond grateful!

chickenleaf.wordpress.com/2025…

#Rust #opensource #rustlang


“We need to get one thing out of the way: Rust is cool. It’s fun.

“It’s tempting to try to sweep this under the rug because it feels gauche to say, but it’s actually important for a number of reasons.

“For one, fish is a hobby project, and that means we want it to be fun for us. Nobody is being paid to work on fish, so we need it to be fun. Being fun and interesting also attracts contributors.”

fishshell.com/blog/rustport/

#rust #RustLang #FishShell


TIL about diff.rs, a web app for viewing source code diffs between two versions of a crate. Neat! #rustlang #rust


I can't wait to see how people use default field values in #Rust!
It felt like an eternity to land this (specially if we count the years of discussion before the, I believe, 3rd RFC was accepted), but as of next nightly you will be able to write

struct Foo {
bar: Type = Type::const_method(),
}

Foo { .. } // implicit `bar: Type::const_method()` call

The main difference between github.com/rust-lang/rust/pull… and derive(Default) is that the latter doesn't support having mandatory fields.
#RustLang



Will never stop being positively surprised by clippy

#RustLang #Rust