Rust

8029 readers
8 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
126
 
 

Version 1.92.0 of Rust has been released. This release includes a number of stabilized APIs, emits unwind tables by default on Linux, validates input to #[macro_export], and much more. See the separate release notes for Rust, Cargo, and Clippy.

127
128
129
10
This Week in Rust 629 (this-week-in-rust.org)
submitted 5 months ago by mrbn@lemmy.ca to c/rust@programming.dev
130
131
5
Rust in Android Devices (flipboard.social)
submitted 5 months ago* (last edited 5 months ago) by indietechnews@flipboard.social to c/rust@programming.dev
132
133
 
 

cross-posted from: https://programming.dev/post/41939535

Hello everyone, i recently published a post about this app launcher (https://programming.dev/post/41551778) and i released version 0.2.0

Many useful features have been added, such as a configuration file and custom themes, and performance has improved

Ram usage is ~20 mb

Here are some highlights of the app launcher:

 Starts up in about ~0.1-0.2s

 Written using the Iced GUI framework

 Supports navigation using arrows

Project GitHub: https://github.com/dest-lab/stryde

Catppuccin Themes GitHub: https://github.com/mxghj/catppuccin-stryde

Feedback and suggestions are welcome

134
135
11
This Week in Rust 628 (this-week-in-rust.org)
submitted 5 months ago by mrbn@lemmy.ca to c/rust@programming.dev
136
137
138
139
 
 

Alex Gaynor recently announced he is formally stepping down as one of the maintainers of the Rust for Linux kernel code with the removal patch now queued for merging in Linux 6.19.

Alex Gaynor was one of the original developers to experiment with Rust code for Linux kernel modules. He's drifted away from Rust Linux kernel development for a while due to lack of time and is now formally stepping down as a listed co-maintainer of the Rust code. After Wedson Almeida Filho stepped down last year as a Rust co-maintainer, this now leaves Rust For Linux project leader Miguel Ojeda as the sole official maintainer of the code while there are several Rust code reviewers.

140
 
 

I've been experimenting a bit with Rust and seeing what I can get to work and what I can't.

I've been able to mostly recreate the Django workflow using these programs: actix web, tera, and butane.

Butane seems to be the least mature out of all of them, and has also given me the most trouble. That said, it's still the closest thing that I can find to Django's ORM.

I'm just letting you guys know in case you're interested and want to try it out.

141
142
143
144
 
 

The Wild linker is a very speedy linker written in the Rust programming language that has become quite competitive with the likes of Mold. A patch sent out this weekend adds Wild support for use with the GNU Compiler Collection (GCC).

The patch adds support for GCC for using the Wild linker with the compiler's "--with-ld" option for specifying the linker. This patch for Wild has been successfully tested with the "vast majority" of tests passing.

145
146
 
 

For example, is there any problems with doing this?

fn main() {  
	static mut BUF: [u8; 0x400] = [0; 0x400];  
	let buf = &mut unsafe { BUF };  
}  

and is this code the same as just using an array directly? From my understanding local variables get put on the stack but do the static variables do too?

I'm essentially trying to find the most performant way to get a simple read/write buffer.

147
 
 

cross-posted from: https://programming.dev/post/40764432

AWS Lambda adds support for Rust - AWS

148
149
 
 

A minimal, declarative setup for productive Rust hacking on Emacs + Guix

I noticed there was a blatant lack of resources and documentation on this particular setup. So I rolled up my sleeves and wrote this article, which hopefully you find useful.

https://jointhefreeworld.org/blog/articles/rust/simple-guix-emacs-rust-development-environment/index.html

See image here of my Emacs with rust-analyzer and clippy working: https://ibb.co/whxq8dX1

150
 
 

We adopted Rust for its security and are seeing a 1000x reduction in memory safety vulnerability density compared to Android’s C and C++ code. But the biggest surprise was Rust's impact on software delivery. With Rust changes having a 4x lower rollback rate and spending 25% less time in code review, the safer path is now also the faster one.

(Emphasis in original.)

Of course, we should probably take the numbers with a grain of salt here; it's not a controlled scientific experiment, and the estimated vulnerability density for Rust in particular was calculated with a numerator of 1, so it could be way off.

Still, I think it's a good reminder that advocacy for using Rust over C and C++ isn't purely out of some irrational fanboy-ism for the language. The numbers here would have to be extremely off for there not to be a major effect.

Further down in the article:

This near-miss inevitably raises the question: "If Rust can have memory safety vulnerabilities, then what’s the point?"

The point is that the density is drastically lower. So much lower that it represents a major shift in security posture. Based on our near-miss, we can make a conservative estimate. With roughly 5 million lines of Rust in the Android platform and one potential memory safety vulnerability found (and fixed pre-release), our estimated vulnerability density for Rust is 0.2 vuln per 1 million lines (MLOC).

Our historical data for C and C++ shows a density of closer to 1,000 memory safety vulnerabilities per MLOC. Our Rust code is currently tracking at a density orders of magnitude lower: a more than 1000x reduction.

view more: ‹ prev next ›