1
7
2
31
submitted 1 week ago by thingsiplay@lemmy.ml to c/rust@lemmy.ml

What's in 1.100.0 stable

  • Never type
  • Allocator API
  • DropGuard API
  • Conjuring zero-sized types
  • Reporting unused dependencies in Cargo
  • Reducing Cargo cache collisions
  • Cargo min-publish-age
  • Stabilized APIs
3
6
submitted 1 week ago by FooBar@szmer.info to c/rust@lemmy.ml

The title seems obvious. I've been developing a tool that I intended to publish as a single crate at crates.io. Internally, the repository had a few crates and I had assumed this is just an implementation detail, and that I would still be able to deploy it as a single crate, where the internal dependencies are bundled.

When I had trouble packaging the thing, I asked someone on discord and they explained to me (thanks!) that actually I needed to merge my crates into one 💀

I wish I knew this earlier, now I think that adding cargo package to Ci in early stages of development really is a good idea.

4
7
Announcing rustup 1.29.3 (blog.rust-lang.org)
5
8
How to fund Rust contributors (blog.rust-lang.org)
6
3
submitted 3 weeks ago by BuggStream@lemmy.world to c/rust@lemmy.ml
7
5
Announcing rustup 1.29.2 (blog.rust-lang.org)
8
14
Announcing Rust 1.99.1 (blog.rust-lang.org)
9
5
10
27
submitted 1 month ago by AMA@piefed.zip to c/rust@lemmy.ml

cross-posted from: https://piefed.zip/c/rust@programming.dev/p/1873943/mpris-lyrics-a-simple-linux-cli-that-displays-synced-lyrics-from-the-mpris-xesam-astext-pr

So yeah, as the probably unnecessarily long title says, this is a CLI that displays the current playing lyrics, but instead of trying to go online and fetch a match it just uses the already there xesam:asText property in MPRIS.

Sadly a lot of popular players that implement the MPRIS2 standard still don't implement that specific one, so it wont work with them. Even the one used in the showcase had to be modified, tho I am hopefully gonna upstream it soon.

I am very strict about AI usage, so for this project the only hint of AI that was used was for tab auto completion that is just used for boilerplate like, idk, implementing the Default trait for PlayerState (not including the actual tricky metadata_last_updated part). Safe to say it was only one notch above no AI at all.

So yeah, here you go give it a try and feel free to roast me, after all this is my first cli and cargo publish ;)

11
15
Announcing Rust 1.99.0 (blog.rust-lang.org)
12
9
submitted 1 month ago by aclarke@lemmy.world to c/rust@lemmy.ml

Managarr is a CLI (command-line) and TUI (Text-based User Interface) tool for managing all of your Servarr's in one place.

This most recent release adds support for Readarr and several compatible forks.

I know that Readarr has sadly been retired, however there's still community support in keeping the dream of Readarr alive. As such, extra time was put into this release to test out Managarr with four of those forks to ensure that in addition to the final release of Readarr, Managarr works with these other forks as well.

So now, as long as a fork of Readarr still is compatible with the v1 Readarr API, Managarr can work with it too.

I tested the following forks and made changes in Managarr to ensure support:

In addition to Readarr (and forks), Managarr supports Radarr, Sonarr, and Lidarr.

You can try it out for yourself without installing it by visiting the demo site if you'd like!

This is a passion project of mine so I'd love to hear any and all feedback! And thanks to all who contributed to this release!

13
12
submitted 1 month ago by Ephera@lemmy.ml to c/rust@lemmy.ml

Was recently somewhat surprised that you can't just copy a Rust executable into a ´scratch´ container and have it work, so this is a cool blog post to find in my RSS feed.

I'm guessing, if you're doing something less complex, then you just need the ´musl´ target and the allocator...

14
14
15
9
16
19
submitted 2 months ago by fzz@programming.dev to c/rust@lemmy.ml

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

Supply-chain through social engineering

17
33
submitted 2 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
18
21
submitted 2 months ago* (last edited 2 months ago) by dessalines@lemmy.ml to c/rust@lemmy.ml

From the README:

Pausing popular torrents isn't something that qBittorrent handles well. This library uses 2 criteria to pause / stop torrents.

They are stopped if they are:

  • Popular (IE have a lot of total seeds), and
  • You've given back more than what you've taken (IE a seed ratio > 1)

Requirements

  • Rust
  • A qBittorrent server.
  • An API key generated through the web UI.
  • A crontab where this script can be periodically run.

Usage

This will pause torrents with a ratio >= 2, and more than 10 total seeds.

cargo run -- \
--api-key API_KEY \
--endpoint ENDPOINT \
--ratio 2 \
--total-seeds 10
19
10
Announcing Rust 1.98.1 (blog.rust-lang.org)
submitted 2 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
20
14
Announcing rustup 1.29.1 (blog.rust-lang.org)
submitted 2 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
21
5
submitted 2 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
22
17
Announcing Rust 1.98.0 (blog.rust-lang.org)
submitted 3 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
23
12
submitted 3 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
24
13
submitted 3 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
25
7
submitted 3 months ago by vi21@lemmy.ml to c/rust@lemmy.ml

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

I guess Goish might be hated by many Rust fans and Go fans. Anyway, below is the example taken from its website.

use goish::{go, KB};
use goish::sync::WaitGroup;

#[goish::main]
fn main() {
    let wg = &WaitGroup::new();
    wg.Add(1_000_000);

    for i in 0..1_000_000 {
        // Explicit 2 KiB stack, sub-page allocated from the chunked
        // stackpool - the opt-in for extreme spawn density. Everyday
        // code just writes go!(move || ...) and never sizes a stack.
        go!(stack(2 * KB), move || {
            do_work(i);
            wg.Done();
        });
    }

    wg.Wait();
}
view more: next ›

Rust Programming

9435 readers
1 users here now

founded 7 years ago
MODERATORS