Rust Programming
!rust@lemmy.ml
help-circle
rss


[Announcement on NixOS Discourse](https://discourse.nixos.org/t/nix-init-generate-nix-packages-from-urls-with-hash-prefetching-dependency-inference-license-detection-and-more) ![](https://user-images.githubusercontent.com/40620903/215294082-81f7c171-c39a-47c3-8a28-0956fd7b9fa9.gif) ### Features - Hash prefetching powered by [nurl] - Dependency inference for Rust packages using the [Riff](https://github.com/DeterminateSystems/riff) registry and python projects - Interactive prompts with fuzzy tab completions - License detection - Supported builders - `stdenv.mkDerivation` - `buildRustPackage` - `buildPythonApplication` and `buildPythonPackage` - `buildGoModule` - Supported fetchers - `fetchCrate` - `fetchFromGitHub` - `fetchFromGitLab` - `fetchFromGitea` - `fetchPypi` - All other fetchers supported by [nurl] are also supported, you just have to specify the tags manually ### Usage ``` Usage: nix-init [OPTIONS] <OUTPUT> Arguments: <OUTPUT> The path to output the generated file to Options: -u, --url <URL> Specify the URL -c, --config <CONFIG> Specify the config file -h, --help Print help -V, --version Print version ``` [nurl]: https://github.com/nix-community/nurl
fedilink

cross-posted from: https://group.lt/post/44860 > Developers across government and industry should commit to using memory safe languages for new products and tools, and identify the most critical libraries and packages to shift to memory safe languages, according to a study from Consumer Reports. > >The US nonprofit, which is known for testing consumer products, **asked what steps can be taken to help usher in "memory safe" languages, like Rust**, over options such as C and C++. Consumer Reports said it wanted to address "industry-wide threats that cannot be solved through user behavior or even consumer choice" and it identified "memory unsafety" as one such issue.  > >The [report](https://advocacy.consumerreports.org/research/report-future-of-memory-safety/), Future of Memory Safety, looks at range of issues, including challenges in building memory safe language adoption within universities, levels of distrust for memory safe languages, introducing memory safe languages to code bases written in other languages, and also incentives and public accountability. More information: - https://advocacy.consumerreports.org/research/report-future-of-memory-safety/ - https://advocacy.consumerreports.org/wp-content/uploads/2023/01/Memory-Safety-Convening-Report.pdf


Using {Blocks} in Rust & Go for Fun & Profit
Did you know you can just whip out curly-braces all over the place in Rust and Go? But why on Earth would you even want to do this?
fedilink

> While the memory safety and security features of the Rust programming language can be effective in many situations, Rust’s compiler is very particular on what constitutes good software design practices. Whenever design assumptions disagree with real-world data and assumptions, there is the possibility of security vulnerabilities–and malicious software that can take advantage of those vulnerabilities. In this post, we will focus on users of Rust programs, rather than Rust developers. We will explore some tools for understanding vulnerabilities whether the original source code is available or not. These tools are important for understanding malicious software where source code is often unavailable, as well as commenting on possible directions in which tools and automated code analysis can improve. We also comment on the maturity of the Rust software ecosystem as a whole and how that might impact future security responses, including via the coordinated vulnerability disclosure methods advocated by the SEI’s CERT Coordination Center (CERT/CC). ![Programming Languages Maturity](https://group.lt/pictrs/image/1b49ce7d-ea9f-43e1-a956-6924b9816017.png)

> Rust is a programming language that is growing in popularity. While its user base remains small, it is widely regarded as a cool language. According to the Stack Overflow Developer Survey 2022, Rust has been the most-loved language for seven straight years. Rust boasts a unique security model, which promises memory safety and concurrency safety, while providing the performance of C/C++. Being a young language, it has not been subjected to the widespread scrutiny afforded to older languages, such as Java. Consequently, in this blog post, we would like to assess Rust’s security promises. ![Rust Protection in Context, table](https://group.lt/pictrs/image/13ba6ce2-e8cd-4228-aa7a-37cab1cd10cb.png)



[Plume](https://joinplu.me/) and [Lemmy](https://join-lemmy.org/) got a shout out on an official Rust site!
fedilink




[r/rust](https://libreddit.spike.codes/r/rust/comments/zmoy8n/announcing_rust_1660)
fedilink

dora is a DHCP server written in Rust using tokio. It is built on the dhcproto library and sqlx. We currently use the sqlite backend, although that could change in the future. The goal of dora is to provide a complete DHCP implementation for IPv4, and eventually IPv6. Dora supports duplicate address detection, ping, binding multiple interfaces, static addresses, etc see example.yaml for all options. It is, however, an early release version and may contain bugs.
fedilink


*In Android 12 we announced support for the Rust programming language in the Android platform as a memory-safe alternative to C/C++ ... In Android 13, about 21% of all new native code (C/C++/Rust) is in Rust. There are approximately 1.5 million total lines of Rust code in AOSP ...*
fedilink

linux kernel news: Rust in the 6.2 kernel (LWN)
The merge window for the 6.1 release brought in basic support for writing kernel code in Rust — with an emphasis on "basic". It is possible to create a "hello world" module for 6.1, but not much can be done beyond that. **There is, however, a lot more Rust code for the kernel out there; it's just waiting for its turn to be reviewed and merged into the mainline.** Miguel Ojeda has now posted the next round of Rust patches, adding to the support infrastructure in the kernel.
fedilink

SerenityOS author: "Rust is a neat language, but without inheritance and virtual dispatch, it’s extr
Just sharing from [r/rust](https://libreddit.spike.codes/r/rust/comments/yuxb8a/serenityos_author_rust_is_a_neat_language_but)
fedilink


Learn Rust by making a Rogue-like game
> this tutorial tries to take you from zero (how do I open a console to say Hello Rust) to hero (equipping items to fight foes in a multi-level dungeon). I'm hoping to continue to extend the series.
fedilink


Hi everyone! This is my first post on Lemmy and it's to showcase a little project I've been working on lately which is my first public project made in Rust. It's a file management tool called Vento, which allows you to move files as if you're playing a text adventure. It's based on an original concept made by a friend of mine on Bash. It consists of three comands: `vento`, `take` and `drop`. I've recorded a demo on Asciinema to showcase its functionality. [![asciicast](https://asciinema.org/a/524454.svg)](https://asciinema.org/a/524454) The project is available to install through [Cargo](https://crates.io/crates/vento) and the source code is hosted on [Codeberg](https://codeberg.org/nixgoat/vento). I'm open to suggestions!
fedilink

> The UX team has been carefully designing widgets and applications over the last year. We are now at the point where it is critical for the engineering team to decide upon a GUI toolkit for COSMIC. After much deliberation and experimentation over the last year, the engineering team has decided to use Iced instead of GTK. > > Iced is a native Rust GUI toolkit that's made enough progress lately to become viable for use in COSMIC. Various COSMIC applets have already been written in both GTK and Iced for comparison. The latest development versions of Iced have an API that's very flexible, expressive, and intuitive compared to GTK. It feels very natural in Rust, and anyone familiar with Elm will appreciate its design. The main jumping-off point for COSMIC is this repository, I think: https://github.com/pop-os/cosmic-epoch The iced crate is here: https://github.com/iced-rs/iced Other GUI tookits for Rust can be found here: https://www.areweguiyet.com/
fedilink

Not really a "sky is falling" sort of post, but it seems like there is room for further exploration and improvement of practices here
fedilink

Tesla is writing their Robots simulation engine in Rust
*The engine simulates physics/discrete/firmware scenarios as movement of robot hands and joints.*
fedilink

Western Digital is already working on an NVMe driver written in Rust
*During the “Linux Plumbers 2022” conference that was ongoing these days, a Western Digital engineer gave a presentation on the development of a controller experimental for SSD NVM-Express (NVMe) written in Rust and running at the Linux kernel level.*
fedilink

Today's Rust and Linux project is up :) I built this plugin so that I could see NetworkManager controls in results that come back from [`pop-launcher`]( https://github.com/pop-os/launcher) I'm using [`onagre`](https://github.com/oknozor/onagre) to query/display/action those results
fedilink


Rust Programming
!rust@lemmy.ml
    Create a post
    • 0 users online
    • 1 user / day
    • 4 users / week
    • 10 users / month
    • 20 users / 6 months
    • 1 subscriber
    • 30 Posts
    • 8 Comments
    • Modlog
    Lemmy
    A community of privacy and FOSS enthusiasts, run by Lemmy’s developers

    What is Lemmy.ml

    Rules

    1. No bigotry - including racism, sexism, ableism, homophobia, transphobia, or xenophobia. Code of Conduct.
    2. Be respectful. Everyone should feel welcome here.
    3. No porn.
    4. No Ads / Spamming.

    Feel free to ask questions over in: