Rust

8133 readers
120 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
1
2
3
4
 
 

i am working on a messaging app and created some details in rust. rust is useful because it has tooling for formal verification. my rust code compiles to WASM to be used in a browser.

my project itself is using cryptography beyond the WASM because browsers provide a crypto api for basic functionality out-of-the-box.

to work with what i have now (javascript/typescript) i came across this page, but the links lead to 404 pages on github. not sure about the status of the project. i dont know if there are other similar projects.

https://formal.land/docs/verification/typescript

i would like to improve the "formal-verification coverage" in my project and wanted to investigate if it could be worth considering rewriting the frontend with dioxus. im happy with an ugly UI (initially) in favour of having formal-verification on a broader scope of my project.

(context: the project where i have formal verification is found here: https://github.com/positive-intentions/signal-protocol (this isnt the gold-standard implementation and its far from finished)

5
6
7
8
9
10
 
 

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 :)

11
12
13
 
 

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

14
15
 
 

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.

16
17
18
19
 
 

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.

20
21
 
 

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.

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

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.

view more: next ›