101
20
submitted 1 year ago by sebsch@discuss.tchncs.de to c/rust@lemmy.ml
102
40
submitted 1 year ago by Sibbo@sopuli.xyz to c/rust@lemmy.ml
103
8
submitted 1 year ago by kixik@lemmy.ml to c/rust@lemmy.ml

comments on r/rust

104
11
submitted 1 year ago by kixik@lemmy.ml to c/rust@lemmy.ml

I've been reading a bit the tracing crate documentation, trying to find out if there's a way to rate limit logs.

What I refer with rate limiting, is that once a particular log has shown up with some frequency (x amount of times in a given time) then it won't be captured or shown anymore, until certain amount of time... This to avoid getting the logs space/buffer being eaten by just one, or a few high frequency errors for example.

Thanks !

105
46
submitted 1 year ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
106
19
submitted 1 year ago by uncle_agrey@lemmy.ml to c/rust@lemmy.ml

Hello, I really need help figuring out Rodio audio playback for a rust project. I need to play a short audio clip of a casino wheel turning a certain amount of times in a loop. When I run the main function, the program plays the audio clip once and then stops completely. If anybody who has used Rodio can give me help it would be greatly appreciated. Also, I have tried using a longer duration in the play_sound function but it doesn't change anything. Thank you

107
71
submitted 1 year ago by dessalines@lemmy.ml to c/rust@lemmy.ml
108
30
submitted 1 year ago by Sibbo@sopuli.xyz to c/rust@lemmy.ml
109
45
submitted 1 year ago by arashsm79@lemm.ee to c/rust@lemmy.ml
110
30
submitted 1 year ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
111
127
submitted 1 year ago by erlend_sh@lemmyrs.org to c/rust@lemmy.ml
112
64
submitted 1 year ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
113
54
submitted 1 year ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
114
14
submitted 1 year ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
115
47
submitted 1 year ago* (last edited 1 year ago) by projectdp@lemmy.ml to c/rust@lemmy.ml
116
23
submitted 1 year ago by raffomania@lemmy.world to c/rust@lemmy.ml
117
12
Are we GUI (build) yet? (epage.github.io)
submitted 1 year ago by epage@kbin.social to c/rust@lemmy.ml
118
13
submitted 1 year ago by I_like_cats@lemmy.one to c/rust@lemmy.ml

I want to build a small gui application in rust. What are my options for application storage? I have heard of the confi crate but I want to save a bit more than just configuration. Is there a crate that handles this for me easily?

119
-10
submitted 1 year ago* (last edited 1 year ago) by qaz@lemmy.world to c/rust@lemmy.ml
120
15
submitted 1 year ago by yoavlavi@programming.dev to c/rust@lemmy.ml
121
10
submitted 1 year ago by crabnebula@fosstodon.org to c/rust@lemmy.ml

if you've been following us for a while you know we're passionate about #Rust! πŸ¦€

We've already discussed how you can install Rust, and we talked about basic concepts like variables and types.

Today, let's talk about sequence types.

πŸ‘‡πŸ‘‡πŸ‘‡

Sequence types are types that store an ordered list of some other type.

Today we'll talk about the two main sequence types @rust:

1️⃣ Arrays
2️⃣ Vectors

⬇️

122
11
submitted 1 year ago by RoundSparrow@lemmy.ml to c/rust@lemmy.ml

In lemmy_server, at this code point: https://github.com/LemmyNet/lemmy/blob/91c024fd987b61ac8892b9e7d1896ee4574751da/crates/db_schema/src/impls/comment.rs#L62

How would I determine if it was an SQL UPDATE or INSERT and skip the remaining blocks of code that do work that does not need to be repeated when a comment edit (UPDATE) is being performed.

Thank you.

123
8
submitted 1 year ago by Barbacamanitu@lemmy.world to c/rust@lemmy.ml

Im trying to use iced for the gui in an audio plug in I'm building, but I keep seeing discrepancies in how to accomplish this.

On the iced github page, it says that to implement the Sandbox trait, you use this signature: fn view(&self), yet in the documentation it says to use view(&mut self). When I try to use the non-mut version, I get an error saying that it expects self to be mutable.

I also stumbled across iced-pure, which seems like a better idea. But I need to use a NumberInput widget from the iced-aw crate. Unfortunately, these widgets are not pure.

So how do I go about creating a gui using NumberInput? Do I need to create the widgets myself to make them pure? I'd like to use other widgets from the iced-aw crate too, so that wouldn't be ideal

Or do i have to use the mutable version of view? If so, why does github say to use non mutable? Is this specific to certain versions of iced? If the newer version of iced uses a non mutable view function, does that mean it's pure? Have the iced-pure changes been merged into iced?

124
-20
submitted 1 year ago by Gargari@lemmy.ml to c/rust@lemmy.ml

Is this some kind of fetish? Seems like Rust attacks purple haired people πŸ˜Άβ€πŸŒ«οΈπŸ˜

125
26
submitted 1 year ago by petsoi@discuss.tchncs.de to c/rust@lemmy.ml
view more: β€Ή prev next β€Ί

Rust Programming

8093 readers
1 users here now

founded 5 years ago
MODERATORS