1
12
2
19
Announcing Rust 1.97.0 (blog.rust-lang.org)
submitted 8 hours ago by nemeski@mander.xyz to c/rust@programming.dev
3
2
Announcing Rust 1.97.0 (blog.rust-lang.org)
4
4
submitted 14 hours ago by cm0002@libretechni.ca to c/rust@programming.dev
5
33
6
9

Tutorial Link

This chapter helps builds a navigable 3D viewport from scratch in Bevy 0.19, starting with the three essentials of any scene (a camera, a light, and a mesh).

We'll be working on more features in the upcoming chapters, stay tuned :)

7
12
submitted 1 week ago by cm0002@lemdro.id to c/rust@programming.dev
8
49
9
7
submitted 1 week ago by cm0002@lemdro.id to c/rust@programming.dev

Thing I stumbled upon:

I added boolean argument & if statement inside sort_unstable_by closure:

//from
|&a, &b| compare(a, b) 

//to
|&a, &b| if is_reverse { compare(b, a) } else { compare(a, b) }

I expected binary to grow slightly, but actually got 1KB smaller.

I dug into & found that the reason is: quicksort fn became 980 bytes smaller.

Why? Not sure. Inlining looks same, quicksort just has fewer instructions.

target: arm-unknown-linux-gnueabihf

commit: https://github.com/tracyspacy/fli/commit/a87a98be77cc1972a53e6399716a227d1135e76b

details: https://pastebin.com/qJdTw49n

OC by @tracyspcy@lemmy.ml

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

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

Thing I stumbled upon:

I added boolean argument & if statement inside sort_unstable_by closure:

//from
|&a, &b| compare(a, b) 

//to
|&a, &b| if is_reverse { compare(b, a) } else { compare(a, b) }

I expected binary to grow slightly, but actually ca 1KB smaller.

I dug into & found that the reason is: quicksort fn became 980 bytes smaller.

Why? Not sure. Inlining looks same, quicksort just has fewer instructions.

target: arm-unknown-linux-gnueabihf

commit: https://github.com/tracyspacy/fli/commit/a87a98be77cc1972a53e6399716a227d1135e76b

details: https://pastebin.com/qJdTw49n

Any ideas?

11
30
12
25

Tutorial Link

Async Rust can be frustrating because the compiler errors feel disconnected from your intent, so you try to fix things without understanding why.

Even working code can hang or run out of order at runtime, with no obvious place to begin debugging.

This chapter guides you to build the state machine behind an async fn by hand, then uses that as a model to reason about common async bugs and compiler errors.

Please let me know in comments if my async series is helpful or not.

13
16
14
14
Announcing Rust 1.96.1 (blog.rust-lang.org)
submitted 1 week ago by cm0002@infosec.pub to c/rust@programming.dev
15
24
Announcing Rust 1.96.1 (blog.rust-lang.org)
submitted 1 week ago by nemeski@mander.xyz to c/rust@programming.dev
16
7

We finally run the libcore tests with rustc_codegen_gcc in the CI of the Rust repo, which should help us a lot with the future syncs. We also finally merged a few more GCC patches, so the gap with upstream is slowly decreasing.

17
23
submitted 1 week ago by cm0002@lemy.lol to c/rust@programming.dev
18
1

I'm kinda still shopping around for a good graphical filemanager. This is of course still very raw, but the tagging system might actually take care of the bookmark aspect, which is very important to me.

19
13
submitted 2 weeks ago by cm0002@toast.ooo to c/rust@programming.dev
20
8
This Week in Rust 657 (this-week-in-rust.org)
submitted 2 weeks ago by cm0002@toast.ooo to c/rust@programming.dev
21
25
22
3

Hocusfocus is a tool I made to track how long you spend on certain tasks (Working, Studying, Wasting time).

It was initially written in Swift, but was rewritten in Go a while ago. Now, I’ve rewritten it in Rust.

23
35
24
23
25
8

geteilt von: https://programming.dev/post/52041408

Have you ever thought about sharing data across language boundaries without serialization? This blog post highlights the challenges behind this endeavor and how they can be overcome.

Note: I'm not the original author of the blog post, but since the author does not have a programming.dev account, I post it on his behalf.

view more: next ›

Rust

8122 readers
48 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 3 years ago
MODERATORS