Rust

7202 readers
17 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
26
27
 
 

☕ Built LogSniff: a @rust CLI that parses logs, exports to CSV, runs Python ML, and plots anomalies.
Next up: real-time alerts & regex rules.
Because fragile stacks deserve a sip & a side-eye.

#RustLang #CyberSecurity #CLItools #MLops #TeaDrivenDev 🫖🦀📊

28
29
 
 

You ever write a @rust game where the player walks into a dungeon, gets punched in the face by a goblin, drinks a healing potion like it’s chamomile, and keeps going like nothing happened?

Because I just did.

Structs, enums, and reckless bravery: the perfect tea blend.
🧌✨🫖

#RustLang #TeaPoweredCoding #TextAdventure #buildinpublic #TerminalGaming

30
31
32
33
 
 

Maybe the question is not well written, but it's because I do not really know what's happening in here. I'm learning Rust, I'm doing pretty good, but this is the second time that stomp with this.

First, I thought that only the Add trait would be enough, but the LSP keep saying me this if I do not add the "restriction", as far as I know.

What I do not get is what <Output = T> is. I know that is using the type T, but why it is assigned to Output?

The first time that I saw something similar was in the Rust book that comes with rustup, just look at the next function signature

Thank you for you help, you are awesome.

34
35
36
13
This Week in Rust 603 (this-week-in-rust.org)
submitted 1 month ago by cm0002@lemmy.world to c/rust@programming.dev
37
38
 
 

We've got a few bugs fixed that allowed us to fully bootstrap the Rust compiler with rustc_codegen_gcc and to fix the CI for Rust for Linux compiled with rustc_codegen_gcc. We hope to improve our testing within the Rust repo in order to allow us to move faster towards our goals.

39
 
 

I got some Ferris plushies made which you can now order at https://trustyswag.com/product/ferris-plushie/

Ideal for stress relief when fighting the borrow checker!

40
11
This Week in Rust 602 (this-week-in-rust.org)
submitted 1 month ago by cm0002@lemmy.world to c/rust@programming.dev
41
 
 

Hi everyone!

I'm conducting a brief survey (takes less than 1 minute) to better understand the Rust open source community. I'm particularly interested in learning about who contributes to Rust projects and what motivates or prevents people from getting involved.

I hope insights from this survey will help us identify better ways to support and engage potential contributors in the Rust community.

Thanks for taking the time to share your perspective!

Survey link: https://tripetto.app/run/MHPMRBFVKT

42
43
44
 
 

I just learned the basics of macros and figured I'd give a shot trying to solve a problem I've had for a while. Theres just one derive trait in this crate, Variants, that when derived will generate a constant array that holds all of the enum's variants along with a method that exposes a static reference to the constant array.

Give it a look, leave some feedback, maybe even open up a PR. I hope you like what you see!

45
 
 

cross-posted from: https://lemmy.world/post/30361372

Hi all,

I don't know where would be the best place to post this, but I wanted some people's feedback on a DSL that I wrote for network analysis.

I am using nom for writing the lexer and parser, then using abi_stable crate for data types so that you can write plugins to the language and load them dynamically as well.

This language is made to work by loading a tree graph (network) and then call a bunch of node or network functions that work on it. There are different ways you can run functions, and use node/network attributes.

I am mostly self-taught, so it took a lot of years to get to a level where I could write something like this. I am learning a lot and having a lot of fun in the process, but I want this to develop into something that can have a practical usefulness to people. Since I am in the field of hydrology, I am making it with river networks in the mind.

To try it out, you can either download the executables for windows from the releases page, or you can compile it using cargo (for all OS; except android where GUI won't work, CLI will work in termux). I have some basic examples in the Learn By Examples section of the User Guide that you can follow.

Please let me know if you can't compile/use it as well. I have tried to make sure it has required instructions, but I could have missed something.

46
47
48
49
50
16
This Week in Rust 600 (this-week-in-rust.org)
submitted 2 months ago by cm0002@lemmy.world to c/rust@programming.dev
view more: ‹ prev next ›