1
2
 
 

Hey, I'm a webdev. I previously approached the project with JavaScript. I'm familiar with the js ecosystem.

I put a fair bit of consideration and in contrast to my JavaScript-approach, I'd like to investigate Dioxus.

I'm not completely new. I've dabbled in rust before. I have read a lot of the docs and I'm sure there is much more to learn amd practice. I also don't want to downplay that I'm ai-slop-maxxing at scale.

What advice would you give to getting started with the rust ecosystem approach?

Similar to a lot of languages there are considerations for things like tests. So it would be useful to see the options there. As well as any other best-practices and nuances.

In relation to my project, I'm particularly interested in the tooling available in rust for formal verification.


Just to be clear, im not here to waste your time on my slop, but if you want to see what I've got so far (practically nothing):

3
Ideas to celebrate Rust 1.100 (users.rust-lang.org)
submitted 15 hours ago by to c/rust@programming.dev
 
 

Saw this thread on the user forum. Anyone here has any ideas? :)

4
5
 
 

I've been working on a platformer game in rust. Game objects are stored in a Vec, and each is updated independently. However, a given object would like to interact with other objects. In C I would do something like fn update(&mut self, others: &mut [Self]). However, this would result in the parameters being aliased, which is not allowed.

What I'm looking for is some type that acts like a &mut [T], but remembers which element it is not allowed to access. I could use two &mut [T] values, built with split_at_mut, but this is unwieldy. I could make a struct that contains both. Is there a crate that does this? Ideally it would use unsafe internally so the compiler knows there is exactly one element in between. (that is to say, I would prefer something using only 24 bytes)

Chain does not do what I want because it can only be used as an iterator, not for indexing. To be clear, I would like to be able to index the result exactly like a &mut [T], except that it will find the element under consideration to be out of range.

6
7
Announcing Rust 1.97.1 (blog.rust-lang.org)
submitted 2 weeks ago by to c/rust@programming.dev
8
9
10
crates.io: development update (blog.rust-lang.org)
submitted 2 weeks ago by to c/rust@programming.dev
11
 
 

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)

12
13
Announcing Rust 1.97.0 (blog.rust-lang.org)
submitted 3 weeks ago by to c/rust@programming.dev
14
Announcing Rust 1.97.0 (blog.rust-lang.org)
submitted 3 weeks ago by to c/rust@programming.dev
15
16
17
 
 

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

18
19
20
 
 

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

21
 
 

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?

22
23
 
 

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.

24
25
Announcing Rust 1.96.1 (blog.rust-lang.org)
submitted 1 month ago by to c/rust@programming.dev
view more: next ›