Rust Programming

8431 readers
34 users here now

founded 5 years ago
MODERATORS
251
 
 

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

The project is available to install through Cargo and the source code is hosted on Codeberg. I'm open to suggestions!

252
 
 

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/

253
 
 

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

254
 
 

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

I'm using onagre to query/display/action those results

255
256
257
258
 
 

It's happening!

259
260
261
262
 
 

publicado de forma cruzada desde: https://lemmy.ml/post/341718

Activitypub is decentralized social networking protocol recommended by the W3C. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and content. As part of the work on Lemmy, we have implemented some high-level abstractions for handling the server-to-server protocol in Rust. These abstractions are now available as a standalone library.

The main features are:

  • Data structures for federation are defined by the user, not the library. This gives you maximal flexibility, and lets you accept only messages which your code can handle. Others are rejected automatically during deserialization.
  • ObjectId type, wraps the id url and allows for type safe fetching of objects, both from database and HTTP
  • Queue for activity sending, handles HTTP signatures, retry with exponential backoff, all in background workers
  • Inbox for receiving activities, verifies HTTP signatures, performs other basic checks and helps with routing
  • Generic error type (unfortunately this was necessary)
  • various helpers for verification, (de)serialization, context etc

Documentation is currently lacking. If you want to get started with the library, best look at the example.

The code has already been used in production as part of Lemmy for a long time, without any notable problems. However, ergonomics are lacking and need to be improved. There are also many additional features which would be worth implementing. See the project readme for details. Contributions and suggestions are very much welcome!

You can find the project here:

https://github.com/LemmyNet/activitypub-federation-rust

https://crates.io/crates/activitypub-federation

263
 
 

This was a fun read

264
 
 

Hello all, I'm learning Rust after years of programming mainly in C/C++.

Python has a very neat shelve library: https://docs.python.org/3/library/shelve.html It's basically a dict (hash table), but is located on disk instead of memory. It's great for easy persistence and also for working with massive objects that won't fit into memory.

Is there anything similar for Rust? I could not find any, but I'm still learning Rust and could have missed it.

265
 
 

For the last year I’ve been leading the development of rust-minidump, a pure-Rust replacement for the minidump-processing half of google-breakpad.

Well actually in some sense I finished that work, because Mozilla already deployed it as the crash processing backend for Firefox 6 months ago, it runs in half the time, and seems to be more reliable. (And you know, isn’t a terrifying ball of C++ that parses and evaluates arbitrary input from the internet. We did our best to isolate Breakpad, but still… yikes.)

266
267
7
This Week in Rust 445 (this-week-in-rust.org)
submitted 2 years ago by [email protected] to c/[email protected]
268
269
270
271
4
Builder Lite (matklad.github.io)
submitted 2 years ago by [email protected] to c/[email protected]
272
273
7
This Week in Rust 444 (this-week-in-rust.org)
submitted 2 years ago by [email protected] to c/[email protected]
274
275
8
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
 

Live coding Rust and Matrix. I'm working on a Matrix bot to supply Arnie quotes, but got distracted adding a Redis back end to matrix-rust-sdk.

I stream every week on Monday 14:00 London time (currently UTC+1). Join me!

https://www.twitch.tv/andybalaam

Or my Owncast instance at https://andybalaam.uk.to

Follow me on mastodon @[email protected] to be reminded about streams, or follow the Owncast instance by clicking Follow at https://andybalaam.uk.to

I'm actually away on Monday, so next stream is on 6th June.

You can watch the old streams at https://diode.zone/a/andybalaam/

view more: ‹ prev next ›