Rust

5989 readers
44 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 1 year ago
MODERATORS
326
327
328
13
This Week in Rust 530 (this-week-in-rust.org)
submitted 10 months ago by runiq@feddit.de to c/rust@programming.dev
 
 

Good choice of crate, llogiq :)

329
 
 

Please let me know if this is possible...

I would like to be able to have a coroutine / generator yield to resume with a value.

This is a simplified version of what I am looking for:

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8be2f397f600236b66970fce5c0ecab6

In this example, yield would end up requesting from the parent, that it wants to read the next byte, and the parent would resume the coroutine with the next byte. (In this case, it's hardcoded to 54, but it can be any value.)

Yet it seems like Rust doesn't have the ability to resume a yield with a value.

Is there any way I can get this to work?

330
331
332
333
 
 

Just discovered a f*-incredibly useful thing!

Lib.rs Maintainer Dashboard is like brew doctor but for your crates on crates.io & docs.rs ❤️‍🔥

It shows outdated deps, docs build errors and a lot of other various things - for all of your crates.

I'm thrilled with the find!

334
 
 

Learn how to wrap a native shared C library in a cross-platform Rust crate for Windows, Linux, macOS and x86_64 + ARM64.

335
336
337
338
 
 

Rauthy is an OpenID Connect (OIDC) Provider and Single Sign-On solution written in Rust.

339
 
 

After adding some lines today to log some information I had missed that was vital for debugging I was wondering if there were any automated tools like linters or similar static analysis tools that help you identity the information to log and or return in error cases.

I am specifically talking about the information that should be identifiable automatically because it contributes to the control flow arriving in the current scope such as values of variables in the condition for the scope or parameters of functions that calculate those values (e.g. the file name in a permission error, the value of a variable that failed an if let or let else pattern match,...

340
 
 

COSMIC is a Wayland desktop environment for Linux that is written in Rust with Smithay and Iced. COSMIC applications are developed with the libcosmic platform toolkit, which is based on iced. They are cross-platform and supported on Windows, Mac, and Redox OS in addition to Linux.

As COSMIC nears its alpha release in Q1 of 2024, we have thus far developed a terminal, file manager, and text editor for our desktop environment within the last few months.

See cosmic-epoch for instructions on building and installing COSMIC.

341
31
submitted 10 months ago* (last edited 10 months ago) by BatmanAoD@programming.dev to c/rust@programming.dev
 
 

Almost five years ago, Saoirse "boats" wrote "Notes on a smaller Rust", and a year after that, revisited the idea.

The basic idea is a language that is highly inspired by Rust but doesn't have the strict constraint of being a "systems" language in the vein of C and C++; in particular, it can have a nontrivial (or "thick") runtime and doesn't need to limit itself to "zero-cost" abstractions.

What languages are being designed that fit this description? I've seen a few scripting languages written in Rust on GitHub, but none of them have been very active. I also recently learned about Hylo, which does have some ideas that I think are promising, but it seems too syntactically alien to really be a "smaller Rust."

Edit to add: I think Graydon Hoare's post about language design choices he would have preferred for Rust also sheds some light on the kind of things a hypothetical "Rust-like but not Rust" language could do differently: https://graydon2.dreamwidth.org/307291.html

342
343
344
345
 
 

87261 rust lines added 76766 / 77063 C++ lines removed ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ 99 %

#riir #rustlang

--

The reader and input stack have been ported, which is basically everything. There's still some entry points in C++ (PR being reviewed) and test helper binary (might make a good external contribution as it's entirely self-contained), but almost all of the C++ is gone, and with it large chunks of the FFI.

Now we just have the second 90% to go - making sure this rewritten fish is portable and distributable!

346
5
submitted 10 months ago* (last edited 10 months ago) by ozoned@lemmy.world to c/rust@programming.dev
 
 

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

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

Live coding Matrix in Rust #owncast #streaming #coding #rust #matrix

Find Andy’s previous recordings at: https://diode.zone/a/andybalaam/video-channels

347
348
 
 

beginner question: What is the advantage of using cmp::Ordering::Less over "<", same for Greater and Equals?

349
350
view more: ‹ prev next ›