1
17
submitted 22 hours ago by nemeski@mander.xyz to c/rust@programming.dev
2
2

Crossposted from https://lemmy.ml/post/43115912

In this example, all todo operations β€” from simple CRUD to tasks own instructions β€” are executed by a virtual machine.

The concept is that any kind of automation or workflow can be enabled by task instructions executed by the VM, rather than hardcoded functions in the app. It’s close to the concept of rules engines.

There are 4 demo task instructions:

  • chain - Creates next task once when another completes. Removes calldata after call - called once
  • either - Sets complete if either one or another task is completed + deletes not completed task (see gif)
  • destructable - task self destructs when it's status set to complete
  • hide - Keeps task hidden while specified task's status is not complete.

It is possible to add your own instructions to calldata.toml and use them within todo example:

cargo run -- add <TASK_TITLE > -calldata <INSTRUCTION_NAME> <PARAMETERS>

repo: https://github.com/tracyspacy/spacydo

todo example : https://github.com/tracyspacy/spacydo/tree/main/examples/todo

3
26
Announcing Rust 1.93.1 (blog.rust-lang.org)
4
12

Kellnr - the open source Rust crate registry - released a new major version. Many month of work went into it. Check it out, if you want to host your own crates or custom toolchains for Rust!

5
45
submitted 6 days ago* (last edited 6 days ago) by cows_are_underrated@feddit.org to c/rust@programming.dev

Someone once told me somewhere, that if I am trying to learn rust, I should learn C first, so that I know how to shoot myself in the foot, learning to avoid doing so, so that the borrow checker of rust doesnt seam to unforgiving (since you somewhat know, what happens if you dont follow best practices). So thats what I did (somewhat) for the past 6 months. I wrote some stuff in C, but mainly I had quite of a deep dive into operating systems (mainly linux), working mechanics of memory and the CPU and a lot more (I will try to make a list of the stuff I learned and the ressources used below). My question to you is, if there are any additional concepts/things I should learn beforehand, to start learning rust.

The (somehwat complete) list of things learned for the past 6 months:

  • Stack Behaviour (Why its so fast, what its used for,....)
  • The heap (why its useful, but dangerous)
  • Theoretical Concepts of threading (Concurrency vs. paralellism)
  • Theory of race conditions (how and why they occur, and some tricks to avoid them)
  • Concepts of Memory allocation on an OS level (Address Spaces)
  • System calls and the separation between kernel and user space
  • Signals
  • Basics of Inter-Process-Communication
  • CPU-Scheduling (CPU-/IO-Bursts, context switches, different scheduling algorithms up to ROund RObin (based on complexity))
  • How loops, conditions and function calls get implemented in Assembly / how the CPU performs these
  • Bitwise Operations

I probably forgot a significant part of the stuff I learned, but its quite hard turning it into a list, without writing a whole book, and trying to remeber everything.
Most of these things are mainly theory, since I havent gotten around to code that much in C. However I definitively have some experience in C. This includes on how to handle pointers, basics of handling the heap, strings (even if I absolutely hate them in C) and some system calls (I played around with sbrk for custom memory management without malloc).

The ressources I used for learning is primarily the YouTube-Channel CoreDumped (I highly recommend), LowLevel and some other ressources, but these were the most helpful ones.

So, feel free to send me down my next rabbit hole before starting rust.

6
21
7
20
submitted 1 week ago* (last edited 1 week ago) by innocentz3r0@programming.dev to c/rust@programming.dev

Supac is a declarative package manager written in Rust fully scriptable in nushell. It's meant to make it easy to use the native package managers in existing distros without going through the associated headaches of using Nix, while maintaining the ergonomics of structured data in nushell.

Currently supported backends are:

  • Archlinux and derivatives
  • flatpak
  • cargo/cargo-binstall
  • uvx (packages only for now)
  • rustup toolchains

I daily drive it, and it works well. Feel free to give it a try!

8
47
submitted 1 week ago* (last edited 1 week ago) by costalfy@programming.dev to c/rust@programming.dev
9
32
submitted 1 week ago* (last edited 1 week ago) by costalfy@programming.dev to c/rust@programming.dev
10
14

I hope it's ok to ask for some feedback here. Of not, please let me know. The rules did not sound like against it

I'm very new to Rust. And while in general my coding background is ok, Rust still feels alien to me. I think I'm just still at "how to think in Rust" part of the curve.

So I would like to ask here for opinions on the following bit of code. I know that those unwrap are too optimistic for production, and I could figure out how to pass io::Error from the function all the way up to the shell. But what are other choices that I don't see?
What would you write differently? What looks like Pythonisms/C++isms? Or is missing the mark completely?

use std::{fs, io};  
use std::path::PathBuf;  
use std::convert::TryFrom;  

use clap::Parser;  
use parquet::file::reader::SerializedFileReader;  
use parquet::record;  
use csv::WriterBuilder;  

#[derive(Debug, Parser)]  
#[command(version, about, long_about = None)]  
struct Args {  
    dir: String,  
    #[arg(default_value = "0")]  
    count: usize  
}  

fn get_files_in_dir(dir: &str) -> Option<Vec<PathBuf>>  
{  
    let dir = fs::read_dir(dir);  
    if dir.is_err() {  
        return None  
    };  
    let files = dir.unwrap()  
        .map(|res| res.map(|e| e.path()))  
        .collect::<Result<Vec<_>, _>>();  
    if files.is_err() {  
        return None  
    }  
    files.ok()  
}  

fn read_parquet_dir(entries: &Vec<String>) ->  impl Iterator<Item = record::Row> {  
    entries.iter()  
        .map(|p| SerializedFileReader::try_from(p.clone()).unwrap())  
        .flat_map(|r| r.into_iter())  
        .map(|r| r.unwrap())  
}  
                            
fn main() -> Result<(), io::Error> {  
    let args = Args::parse();  
    let entries = match get_files_in_dir(&args.dir)  
    {  
        Some(entries) => entries,  
        None => return Ok(())  
    };  


    let mut wtr = WriterBuilder::new().from_writer(io::stdout());  
    for (idx, row) in read_parquet_dir(&entries.iter().map(|p| p.display().to_string()).collect()).enumerate() {  
        let values: Vec<String> = row.get_column_iter().map(|(_column, value)| value.to_string()).collect();  
        if idx == 0 {  
            wtr.serialize(row.get_column_iter().map(|(column, _value)| column.to_string()).collect::<Vec<String>>())?;  
        }  
        wtr.serialize(values)?;  
        if args.count>0 && idx+1 == args.count {  
            break;  
        }  
    }  
    
    Ok(())  
}  
11
15
Websurfx 1.24.36 release (programming.dev)
submitted 1 week ago* (last edited 1 week ago) by neon_arch@programming.dev to c/rust@programming.dev

Hello again!!

Sorry for the big delay in the announcements. I know it has been a long time I have not made any announcements but I will try my best next time this doesn't happen again.

So, through the medium of this post I would like to share with you all the v1.24.36 major release version of the websurfx project which was released on the 26th of January.

If you are new, and you don't know what is websurfx then I would suggest taking a look at my previous post here:

https://programming.dev/post/2678496

Which covers in depth about what the project is and why it exists.

Credits

Before I share with you the changelog, what this release version means and a preview on what we are planning to work on for the next major release v2.0.0. I would first like to thank all our contributors and maintainers because of whom this was all possible. Specially I would like to thank spencerjibz, MickLesk and SchweGELBin who have been invaluable to the project. Also, Websurfx would not have been possible without alamin655 and xffxff early involvement.

thanks Thanks πŸ’– to all the people involved in the project

Now, let's dive straight into what this release version actually means.

What does this release version means

This new release version v1.24.36 updates the hybrid caching api to take advantage of the two layer caching solution which eliminates the round trip time delay of fetching the same results from the cache.

Changelog

The changelog of all the changes can be found here:

https://github.com/neon-mmd/websurfx/releases/tag/v1.24.36

Preview of the goals for the next major release

  • Different levels of privacy to choose from with the help of rust's conditional compiling features (In progress).
  • Even more engines will be supported.
  • Categories would be added to search results like images, news, etc.
  • More themes will be provided by default
  • More animations for the websurfx frontend will be supported.
  • Multi language support would be added.
  • I2p and tor support will be provided.
  • Reduce animations would be added for those who don't want animations and effects on the frontend.
  • And lots more ✨.

Call To Action

If you love our project and want to see it move ahead and progress in the direction you want, then we would suggest contributing at our project

12
3
submitted 1 week ago by tracyspcy@lemmy.ml to c/rust@programming.dev

cross-posted from: https://lemmy.ml/post/42532243

Recent updates:

  • VM now uses NaN-boxing technique.
  • All stack values are 64-bit (u64) but encode 5 distinct types: Boolean, String, CallData, U32, and MemSlice (25-bit offset + 25-bit size). code
  • Added InlineVec β€” a vector-like structure backed by a fixed-size array. The VM stack, control stack, call stack, and jump stack now use it with defined limits. code
  • VM now has a heap memory. Memory is simple Vec, grows dynamically, but technically length is restricted by mem_slice_val format: 25 bits payload for offset and size

Project is still in absolutely early stage.

13
21
14
30
15
10
16
18
17
12
18
14
19
2
20
21

I just ran into the wonderful error message

the trait is not dyn compatible because method publish_video is async

and boy, what a rabbit hole. I found out about async_trait which resolves this by turning async methods into fn method() -> Pin<Box<dyn Future + Send + 'async_trait>>, but I thought that's what the async fn was syntax sugar for??? Then I ran into this member-only medium post claiming

Rust Async Traits: What Finally Works Now

Async functions in traits shipped. Here’s what that means for your service interfaces.

But I clicked through every rust release since 1.75.0 where impl AsyncTrait was shipped and couldn't find a mention of async. Now I'm just confused (and still using async_trait). Hence the question above...

21
21
crates.io: development update (blog.rust-lang.org)
submitted 3 weeks ago by nemeski@mander.xyz to c/rust@programming.dev
22
21
23
9
This Week in Rust 635 (this-week-in-rust.org)
submitted 3 weeks ago by mrbn@lemmy.ca to c/rust@programming.dev
24
-3
submitted 3 weeks ago by aclarke@lemmy.world to c/rust@programming.dev

Managarr v0.7.0 has been released with Lidarr support!

What is Managarr?

Managarr is a terminal-based application for managing all your Servarr instances from one place. It provides a user-friendly interface to interact with your media libraries, making it easier to manage your downloads, monitor your artists and albums, and perform various actions directly from the terminal.

It sports two modes: a TUI mode (Text-based User Interface) and a CLI mode (Command Line Interface).

TUI mode gives you an interactive User Interface right inside your terminal window, allowing you to navigate through your Sonarr and Radarr libraries, view details about your series and movies, and perform actions like adding or removing items, all through keyboard shortcuts.

CLI mode lets you execute commands directly from the terminal to manage your Servarr instances without needing to open the TUI. This is great for quick tasks or for integrating with scripts and automation tools.

Screenshots

Try it out for yourself using the in-browser demo!

If you want to try it out for yourself without installing it first, you can use the Managarr demo-site: https://managarr-demo.alexjclarke.com/

What Lidarr operations are supported?

πŸ“š Library Management

  • Artist Library - Browse, search, filter, and sort your music collection
  • Add Artists βž• - Search for new artists and add them with full config options (quality profile, metadata profile, root folder, monitoring options)
  • Edit Artists ✏️ - Tweak artist settings including quality profiles, metadata profiles, tags, and monitoring status
  • Delete Artists πŸ—‘οΈ - Remove artists from your library with optional file deletion
  • Artist Details πŸ” - Get the full picture on any artist:
    • Overview, disambiguation, type, status, genres, and ratings
    • Album list with release dates, track counts, and download status
    • Artist history with detailed event info
    • Manual discography search with release selection and download

πŸ’Ώ Album & Track Management

  • Album Details - Drill into individual albums to see:
    • Track listing with audio info (codec, channels, bitrate, sample rate, bit depth)
    • Album history
    • Manual album search for grabbing specific releases
  • Track Details 🎼 - View individual track info and history
  • Delete Albums - Remove individual albums from your library

⬇️ Downloads & Queue

  • Downloads Tab - Keep an eye on active downloads and manage your queue
  • Blocklist 🚫 - View and manage blocked releases

πŸ“œ History

  • Full History Support - Browse, search, filter, and sort Lidarr event history
  • History Details - Dig into the details of any history event
  • Mark as Failed ❌ - Mark history items as failed

πŸ”Ž Indexers

  • Indexer Management - View, add, edit, and delete indexers
  • Indexer Settings βš™οΈ - Configure global indexer settings
  • Test Indexers πŸ§ͺ - Test individual or all indexers at once

πŸ“ Root Folders

  • Root Folder Management - Add and manage root folders for your music library

πŸ–₯️ System

  • System Status - View Lidarr system info and health checks
  • Tasks - View and trigger system tasks
  • Queued Events - Monitor queued system events
  • Logs πŸ“‹ - Browse system logs
  • Updates πŸ†™ - Check for and view available updates

⌨️ CLI Commands

Full Lidarr CLI support for all the things!

managarr lidarr list artists|albums|tracks|indexers|root-folders|tags|quality-profiles|...
managarr lidarr get artist|album|track|...
managarr lidarr add artist|root-folder|tag|...
managarr lidarr edit artist|indexer|indexer-settings|...
managarr lidarr delete artist|album|root-folder|tag|blocklist-item|...
managarr lidarr search artist|album|...
managarr lidarr refresh artist|downloads|...
managarr lidarr trigger-automatic-search artist|album
managarr lidarr manual-search artist|album

Managarr also supports Radarr and Sonarr!

If you're running the full *arr stack, Managarr has you covered - It supports Radar and Sonarr too, all from the same interface!

This is a passion project so I'd love to hear your feedback, feature requests, or any bug reports you find.

25
7

A short blog post that reviews the development of kellnr, the Rust crate registry, in 2025.

view more: next β€Ί

Rust

7763 readers
51 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