1
11
submitted 11 hours ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
2
9
submitted 5 days ago by vi21@lemmy.ml to c/rust@lemmy.ml

cross-posted from: https://lemmy.ml/post/51402479

I guess Goish might be hated by many Rust fans and Go fans. Anyway, below is the example taken from its website.

use goish::{go, KB};
use goish::sync::WaitGroup;

#[goish::main]
fn main() {
    let wg = &WaitGroup::new();
    wg.Add(1_000_000);

    for i in 0..1_000_000 {
        // Explicit 2 KiB stack, sub-page allocated from the chunked
        // stackpool - the opt-in for extreme spawn density. Everyday
        // code just writes go!(move || ...) and never sizes a stack.
        go!(stack(2 * KB), move || {
            do_work(i);
            wg.Done();
        });
    }

    wg.Wait();
}
3
9
submitted 2 weeks ago by dessalines@lemmy.ml to c/rust@lemmy.ml
4
35
5
8
submitted 2 weeks ago by xoron@programming.dev to c/rust@lemmy.ml

Hey, I'm a webdev. I previously approached my 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 and practice.

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

6
13
Announcing Rust 1.97.1 (blog.rust-lang.org)
7
8
submitted 1 month ago by PuercoPop@piefed.social to c/rust@lemmy.ml
8
9
crates.io: development update (blog.rust-lang.org)
9
17
Announcing Rust 1.97.0 (blog.rust-lang.org)
10
6
submitted 1 month ago by dessalines@lemmy.ml to c/rust@lemmy.ml
11
23
submitted 1 month ago* (last edited 1 month ago) by remustan37@sh.itjust.works to c/rust@lemmy.ml

Which rust ui framework works the best on android? The only one I've seen being used is tauri, but its web based.

12
17
submitted 1 month ago by floofloof@lemmy.ca to c/rust@lemmy.ml
13
11
submitted 1 month ago by tracyspcy@lemmy.ml to c/rust@lemmy.ml

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

14
17
Announcing Rust 1.96.1 (blog.rust-lang.org)
15
7
16
22
submitted 2 months ago by tracyspcy@lemmy.ml to c/rust@lemmy.ml

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

Initial release of FLI - really tiny and fast (like a 🪰) directory listing tool.

Initial Why: need some easy readable ls like tool for rpi to use via ssh.

Current Why: check if with Rust one can build core utils like tools faster and smaller.

  • Size:

18K - RPI ZERO W

51KB - Mac

  • Default mode streams readdir() => stdout with zero heap allocation.

  • Nice readabilty thx to (📄 and 🗂️) instead of text coloring

  • Written in no_std #rust + libc.

https:// github.com/tracyspacy/fli

17
10

Hello,

I have been learning rust and want to make something exciting so I though why not build a Lisp compiler in Rust B)

so here what I did today. https://gist.github.com/anon2834678263/bcaa06e934f7b478be79203553f170ee

the tokenizer isn't ready and might have horrible bugs but at least I got comfortable declaring immutable variable by default, not surrounding stuff with parentheses unnecessarily. oh and also Enums which is most powerful thing in rust as people say.

I am still not satisfied though since the code looks more like C than Rust xD

maybe some experienced people can correct me :)

18
3
submitted 2 months ago by veloren23djk@lemmy.zip to c/rust@lemmy.ml

I am creating an app that will have some data visulization features. I have no experience in tauri or web dev, so I want to know whether it is possible to render D3.js, plotty, etc. and use them as a part of the tauri frontend

19
19
submitted 2 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
20
11
submitted 2 months ago by thingsiplay@lemmy.ml to c/rust@lemmy.ml
21
1
submitted 2 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
22
6
submitted 2 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
23
19
submitted 2 months ago by Ephera@lemmy.ml to c/rust@lemmy.ml
24
11
This Week in Rust 653 (this-week-in-rust.org)
submitted 2 months ago by dessalines@lemmy.ml to c/rust@lemmy.ml
25
8
submitted 3 months ago by steam_lover@sh.itjust.works to c/rust@lemmy.ml
view more: next ›

Rust Programming

9354 readers
11 users here now

founded 7 years ago
MODERATORS